Site breaks when I set a cloudflare page rule to bypass cache

WordPress site behind Cloudflare. Added a bypass cache rule for the admin and checkout pages and now the homepage loads without CSS for some visitors. Removing the rule fixes it. What am I getting wrong in the rule?
2

Leave A Reply

Log in to post an answer.

2 Answers

lila_growth Oct 30, 2026
denjoshep87
Quick way to prove it's caching and not something else: turn on Development Mode in Cloudflare for a bit and load the broken page. If it's fine, it's the cache. Then check the cf-cache-status header on the CSS files in dev tools, HIT on a file that 404s points straight at the stale HTML problem.
ben_18 Oct 09, 2026
denjoshep87
Two things to check. First the pattern itself: a rule with *admin* in it or a leading wildcard can match far more than you think, including CSS and JS files. Make it specific, e.g. the full /wp-admin/* path and the exact checkout path. Page rules also stop at the first match, so order matters if you have a cache everything rule too. Second, and this is the usual cause of "no CSS for some visitors": if you run a caching or minify plugin, the cached homepage HTML can point to combined CSS files that have since been regenerated with new names. Changing the rule shuffles what's cached, so some people get old HTML pointing at a file that no longer exists. Purge the plugin cache and Cloudflare together after any rule change. If you're setting this up fresh, the newer Cache Rules are easier to read than page rules for exactly this kind of thing.