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.
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.
2
Answers
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 missinghttps://
.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.I noticed that you use an asterisk symbol in the condition value for the operator Contains:
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:
or
For example, this is how the hostname condition should look like: