Website www.suspend.impaktt.com is not redirecting suspend.impaktt.com (non-www)

What is the name of the domain?

www.suspend.impaktt.com

What is the issue you’re encountering

Website www.suspend.impaktt.com is not redirecting suspend.impaktt.com (non-www)

What steps have you taken to resolve the issue?

I have added following 2 Rules for redirecting www.suspend.impaktt.com to suspend.com(non-www)
but its not working, although main domain name is redirecting correctly i.e: www.impaktt.com to impaktt.com

Rule 1:
If… Custom filter expression

When incoming requests match…
Field: URI Full
Operator: Contains
Value: www.suspend.impaktt.com/*
Expression Preview: (http.request.full_uri contains “www.suspend.impaktt.com/*”)

Then…URL redirect
Type: Static
URL: https://suspend.impaktt.com
Status Code: 301

Rule 2:
If… Wildcard pattern

When incoming requests match…
Request URL: https://www.*

Then…Redirect to target URL. This can be static or dynamic using a wildcard replacement ${1}, ${2}, etc.
Target URL: https://${1}
Status Code: 301

Also i have added below CNAME in DNS just for in case pointing concern.

Type: CNAME
Name: www.suspend
Target: suspend.impaktt.com

What are the steps to reproduce the issue?

Hit, www.suspend.impaktt.com it shows same error page

while when you hit www.impaktt.com, it redirects to impaktt.com

Screenshot of the error

The error you are facing is because the Universal certificate only covers one level of subdomain, not two. You could subscribe to Advanced Certificate Manager (ACM) to resolve this, but I suspect given the purpose of the domain not having the www.suspend subdomain at all is probably a better solution!

Your first rule are doing exactly what you configured, but probably not what you wanted. * is not a wildcard, it is treated as a string when using the contains operator.

% curl "https://impaktt.com/www.suspend.impaktt.com/*" --dump-header -
HTTP/2 301
location: https://suspend.impaktt.com

Without ACM your second rule will only ever work for www.impaktt.com.

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.