Cloudflare cache displaying custom error page even after resolving server errors

What is the name of the domain?

What is the error number?

500

What is the error message?

Failed to load resources

What is the issue you’re encountering

Over the internet, webpage is showing error 500 but if i switch-on the development mode on Cloudflare, that webpage is coming correctly. It means we have resolved the error from server side but cloudflare’s is somehow is displaying the cache version custom error page.

What steps have you taken to resolve the issue?

I have tried purging that webpage using custom purging. Within Cache rules, i have altered TTL for 500 code error from 1 day to “no cache”. Within page rule, I have changed the cache level for such webpages to “standard” ; and Edge cache TTL to “a day”. But still same issue persists.

Screenshot of the error

Error 500.jpg

Hi there,

A request to https://datastringconsulting.com/ hits 2 cache rules. The 1st one is called Bypass Cache (Home & Others) and the other one is called Cache Everything [Template], since cache rules are stackable, both are applied and any conflict is resolved by applying the last rule.

So if you want the 1st rule to be applied instead, either apply a custom filter expression on the second rule, or move the second rule to a place above the current 1st rule.

Related:

Cache Rules are stackable. This means that multiple matching rules can be combined and applied to the same request. For example, if multiple cache rules match the same URL, then the features set in those cache rules will all be applied in order. If several matching rules set a value for the same setting, the value in the last matching rule wins. For an example of a similar scenario where multiple rules match, refer to the Origin Rules FAQ.

Take care.

1 Like

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