How to avoid subdomain redirect in Redirect Rules?

What is the name of the domain?

olddomain.com - newdomain.com

What is the issue you’re encountering

Unable to restrict subdomain redirects

What steps have you taken to resolve the issue?

olddomain.com/* - i want to redirect all pages inside this domain to newdomain.com
subdomains.olddomain.com - should not be redirected to newdomain.com

but all subdomains are also getting redirected to newdomain.com
how to avoid subdomain redirection

Could you share with us the Expression or the screenshot for that rule ?

1 Like

Based on the use of a wildcard in your example, I presume that you were using a Page Rule.
I would delete that and use a Redirect Rule instead. Examples 3 and 4 in the following guide may help you write your rule.

Im not using page rules, im using redirect rules.

If i configure all incoming requests, hostname = olddomain.com to point to newdomain.com it works perfectly. but it also redirects all the subdomains.olddomain.com as well. how do i filter that alone?

If you configure…

…then hostname is not checked. You need to match with a filter as shown in the examples I linked.

1 Like