Steady stream of 520 errors since putting the site behind cloudflare

520 on roughly 1 in 20 page loads, mostly checkout and account pages. Host swears the server is fine. What usually causes it?
1

Leave A Reply

Log in to post an answer.

1 Answer

barolideepak_ppc Oct 16, 2026
nina_ads
A 520 means your server answered Cloudflare with something it couldn't make sense of, often an empty response or a dropped connection. So the problem is on the origin, Cloudflare is just the messenger. Things I'd check, roughly in the order I've seen them cause it: - a firewall or security plugin on the server rate limiting or blocking Cloudflare's IPs, since now all your traffic arrives from a small set of them. Allowlist Cloudflare's IP ranges - PHP or the web server crashing or restarting under load - very large response headers, usually from too many or too big cookies Note the time of a few 520s and match them against the server's error log. If the log shows nothing at that time, it's the connection being cut before the app even runs, which points back at the firewall.