Page Rule Sequence

Howdy,
What is the preferred sequence for a rule with “Cache Everything”?

Should it be the first Rule or the last Rule?
In other words, should exclusions to caching precede “Cache Everything”, or come afterward?

Thanks,

  • Technoogies

Only one Page Rule will fire and take effect on a request.

https://support.cloudflare.com/hc/en-us/articles/218411427-Understanding-and-configuring-Cloudflare-Page-Rules-Page-Rules-Tutorial-

  • Only the highest priority matching page rule takes effect on a request.
  • Page rules are prioritized in descending order in the Cloudflare dashboard, with the highest priority rule at the top.

With that in mind, you’d want any “bypass cache” before your “cache everything” wildcard rule.

3 Likes

Page rules execute in order from top to bottom. Once there is a match no other rules are evaluated. If you want something specific to happen or should be first. General rules should be lower as a fallback for previously unmarried chef conditions.

3 Likes

Thank you, that’s a very important distinction also.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.