Cloudflare error pages popping up randomly on our site

Visitors sometimes get a cloudflare error screen instead of the site, then a refresh works. It's not always the same code, I've seen 521 and 522. Where do I start, the host or the cloudflare settings?
1

Leave A Reply

Log in to post an answer.

1 Answer

marthc Oct 16, 2026
miaf
What's the error number on the page? It tells you where the problem is. 520 to 524 mean Cloudflare is fine and your origin server isn't answering properly. 521 is the server refusing the connection (often a host firewall blocking Cloudflare's IP ranges), 522 is a timeout connecting, 524 is a request that took too long, usually a slow page or a heavy admin task. "Random" errors are often the server running out of resources at busy moments, so check the host's resource usage for the times they show up. If it's a 1xxx error instead, that's a Cloudflare setting, like a firewall or WAF rule catching real visitors.