skip to Main Content

I have a rule set to URL redirect specific domain names but I cannot figure out how to use a wildcard to forward all and any subdomains that a user would enter in.

My attempt was this with no luck.

enter image description here

2

Answers


  1. This documentation states that the Request URL condition includes the protocol in the string matching. So the example from your screenshot would not work as its missing https://.

    However scrolling down in the manual to the section on Host name based matching. The shown example of hosting the hostname condition with an ends with operator seems to be exactly what is needed to catch all subdomains. Although it’s also worth trying the wildcard solution on the host name match condition.

    Login or Signup to reply.
  2. I noticed that you use an asterisk symbol in the condition value for the operator Contains:

    *.example.com
    

    However, wildcard expressions are only supported by the Wildcard operator and Request path conditions (see documentation here).

    You can use one of the following options to build a condition to catch all subdomains:

    Condition: Request URL

    Operator: Contains

    Value: .example.com

    or

    Condition: Host name

    Operator: Contains or Ends with

    Value: .example.com

    For example, this is how the hostname condition should look like:
    Hostname condition example

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search