HTTP 520 ("Web server returned an unknown error") is a Cloudflare-specific status meaning Cloudflare's edge reached the site's origin server but got back something it couldn't interpret — an empty, malformed, or crashed response. Unlike a 403 or 1015, it usually signals a problem behind Cloudflare, not a judgment about you.
Cloudflare sits between visitors and the site's real (origin) server. On a 520, the edge forwarded your request but the origin's reply violated HTTP expectations — a connection reset mid-response, an empty reply, a crashed application process, or headers too large for Cloudflare to accept. The 5xx family here (520, 521 connection refused, 522 connection timed out, 523 unreachable, 524 response timeout) all describe origin-side failures, each a different way the origin let the edge down.
That makes 520s different in kind from 403s and 1015s: those are verdicts about your request; a 520 is usually the site's own infrastructure failing — often transient, sometimes load-related.
Because 520s are frequently transient, the right first response is a modest retry with backoff — many clear in seconds. If 520s correlate with your request bursts, your traffic may be contributing to origin load, which is both an ethical and practical reason to slow down: a scraper that topples the origin gets nothing.
Persistent 520s on specific URLs can also be a soft-block pattern — some origins are configured to drop connections from suspected bots rather than answer them, which surfaces at the edge as a 520. If a page 520s for your scraper but loads in a browser, treat it as a disguised anti-bot signal and apply the same diagnosis as a 403: fix the fingerprint and IP before assuming the site is down.
How Crawlora handles this
Crawlora's retry layer handles the transient-vs-persistent distinction automatically — backoff for origin blips, identity rotation when the pattern looks like a soft block — and since billing is pay-on-success, a 520'd attempt costs nothing.
Related reading
Glossary
FAQ
Usually not — it means the site's origin server gave Cloudflare an invalid response, which is typically their infrastructure failing. But if 520s track your request bursts, you may be contributing to origin load, and persistent 520s that don't affect browsers can be a disguised bot block.
As a visitor or scraper: retry with backoff — most 520s are transient. If they persist for your client but the page loads in a browser, treat it like a 403: improve your fingerprint and IP. If you own the site, check origin logs for crashes, resets, and oversized headers.
Both are bad-gateway-style failures, but 502 is the generic HTTP status any proxy can return, while 520 is Cloudflare's catch-all for an origin response it couldn't interpret at all — Cloudflare reserves 502/504 for cleaner gateway failures and 520 for the unclassifiable ones.
Browse Crawlora APIs, test a request in Playground, and move from scraping infrastructure work to production data workflows.