Is it .* or a * for page rule

I just need clarification on this once and for all as I see conflicting guides.

Using page rules is it correct to use the following to add both www and non-www to the rule
Which one is it:-

*yourdomain.com or
*.yourdomain.com

I have seen different guides ( Even on the Cloudflare site ) that have both so which is the correct one to use ?

A rule with a period after the asterisk will not match the root domain, only any subdomain. ex:

Rule: *.example.com*

http://example.com :x:

http://xd.example.com :white_check_mark:

While a rule without the period will match both the root and all subdomains:

Rule: *example.com*

http://example.com :white_check_mark:

http://xd.example.com :white_check_mark:

5 Likes

Thank you for that easy to understand explanation. I will just remember that a dot means subdomain :slight_smile:

Thanks again.

A post was split to a new topic: Page Rule Wildcards