Site run from cache when origin server return 5xx errors

Good day Cloudflare Community,
I got question regarding what’s the best practice to make my site still run/show up when origin server return 5xx errors.

Researched online a little bit and all I got is run from Cloudflare workers.

I am wondering if there is a way to handle it from Cloudflare cache?
Like the following cache rule setup and turn on when origin server return 500 error?

Thanks for all your help.

Hi there,

For statuses from 520 to 527 you can enable Always Online under Caching > Configuration and Cloudflare will be serving a static version of the website wile the origin recovers.

Take care.

Thanks mcorreia,
How about for the new users that during origin server crash time? I guess they will see site crash information?

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