Multisite Page Rules

Hey there! New to cloudfare and trying to square away caching.

I use my own caching, and since I don’t see a way to just ‘turn off’ caching on the CDN side I’ve added page rules like mysitess.com/* and such.

The thing is, I have a Multisite installation. I can do the subsites through like *.mysite.com but I’m having trouble understanding how to turn off caching on mapped domains?

Cloudflare doesn’t differentiate between Multisite, and plain ol’ Lots Of Websites. Just remember that Wildcard DNS subdomains won’t proxy through Cloudflare: *.example.com

You’re still limited to the number of Page Rules your plan offers. If you don’t want any caching, create a Page Rule to match *example.com/* with a Cache Level of Bypass Cache. But if you want to retain caching for your main site, you can create Page Rule #1 (higher priority) to match example.com/* with Cache Level set to Standard.

1 Like

Okie doke. So this is what I’m doing presently.

I think maybe I’m just not understanding the mapped domains part? For example, you can map site1.mainsite.com to your own domain. Does caching for the subdomains apply to whatever domain it’s mapped to as well?

Again, Cloudflare doesn’t care about mapping. To Cloudflare, they all look like independent subdomains in your account.

No, not if your Page Rule Match is specifically set for the subdomain.

Your rules could be condensed to a match of: *example.com/*, but I suspect that’s not what you plan to do…
The asterisks will match everything, including blank, so root and all subdomains are matched. At the tail end, root and all files/subdirectories are matched, including blank.
So… with that one rule (*example.com/*)nothing would be cached by Cloudflare, anywhere in your account.

Stepping through your rules as they apply to your current setup, but you can use different actions for each rule:
Rule #1: All subdomains, and all their content have Bypass Cache.
Rule #2: All subdomains, but just their homepage HTML will Bypass Cache (this rule should go first, because your current Rule #1 will match the homepage and trigger before Rule #2 is checked.
Rule #3: Your main domain, and all its content have Bypass Cache.

p.s. Remember that ‘www’ is considered a subdomain if your “main domain” uses ‘www’ instead of the naked domain.

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