Redirecting rules

What is the name of the domain?

test.com

What is the issue you’re encountering

The subdomain is not redirecting

What steps have you taken to resolve the issue?

Hi there
I want my redirect rule to also work for subdomains currently it onyl redirect main domain to main and even subdomain redirects to main, here is my expression:
concat(“https://test1.com”, http.request.uri.path)

What is the problem? it is set to dynamic too and all incoming requests

Make sure the subdomains have DNS records - use a proxied AAAA 100:: if there is no real origin server.

Otherwise if you can give the real domain and subdomain and show a screenshot of the DNS records and redirect rule, it is easier to check.

Hi Sjr

My domain domain.com and admin.domain.com both have A record which are pointing to my server IP.
Here is redirect rules


but domain .com redirects to newdomain .com and admin. domain .com redirect to newdomain .com instead of admin. newdomain .com

Then you need to either:

  • create 2 rules, one for the domain and one for admin using a Custom filter expression based on the Hostname field so you can redirect each separately
    or
  • use the Wildcard pattern option to redirect https://*example.com/* to https://${1}example.net/${2} for a general option

This topic was automatically closed after 15 days. New replies are no longer allowed.