Cache Bypass Rules Not Working for Subdomain
I have a WordPress site that uses an online schooling plugin whose functionality is sensitive to caching plugins or software. This site is on a subdomain, and this install has no caching plugins active. The school software developers have identified Cloudflare as the source of the issues with the schooling plugin/site.
The primary site can and does use a caching plugin and is on Cloudflare along with this subdomain. I have both Page and Cache rules configured, but somehow, Cloudflare is caching the subdomain, and the school software is being wonky. Here’s what I have for the Page rule:
URL: learn.carm.org/
Cache Level - Bypass
I have four Cache rules, and this bypass rule for the subdomain is number one, which should negate the remaining three. However, the remaining three are related to the primary domain, not the subdomain, so I imagine it's moot either way.
Hostname = learn.carm.org/
Bypass Cache
Are these configured correctly, or should they be configured differently? If configured correctly, what else should I check on the Cloudflare side?
2 Replies
Discord formatting potentially messes up your wildcards. It's worth noting a few things:
1. Cache Rules take precendence over Page Rules
2. The Cache Rule Hostname format would be exactly
learn.carm.go
, having the /*
would break your match
3. In Cache Rules, one matching rule doesn't stop the execution of the rest. If several matching rules set a value for the same setting, the value in the last matching rule wins.
https://developers.cloudflare.com/cache/how-to/cache-rules/order/
You def stlil have some rule applying and forcing caching of the html. I would use the account level trace tool (https://dash.cloudflare.com/?to=/:account/trace/search), and trace your url, and see which Cache Rules/etc it's matching, keeping in mind the last rule wins and cache rules take precedence over page rules.This is helpful, thank you.