Cloudflare 520 (Unknown Error)
HTTP 520 is a Cloudflare-specific status code, not part of any IANA/RFC standard. Cloudflare returns 520 when the origin server returns an empty, unknown, or otherwise unexpected response that Cloudflare cannot interpret. It is a catch-all for connection issues between Cloudflare and the origin, and it points to the origin or the connection, not to Cloudflare itself.
What 520 means (Cloudflare-specific)
520 is not an IANA-registered HTTP status code. It is one of Cloudflare's own 52x range of errors. Cloudflare documents 520 as 'Web server returns an unknown error' — the edge made a connection to the origin but received an empty, unknown, or unexpected response it could not serve to the visitor.
Because it is a catch-all, 520 covers several underlying causes: the origin dropping the connection, returning malformed headers, sending an empty reply, or crashing mid-response.
How to diagnose it
The defining clue is that 520 points at the origin or the edge-to-origin connection, not at Cloudflare's network. The standard first step is to request the origin directly (bypassing Cloudflare) to see whether it returns a clean response. If the origin misbehaves on its own, the fix is there.
Common contributors include the origin web server crashing or restarting, exceeding header-size limits, sending too many or oversized cookies, or empty responses from a failing application. Reviewing origin error logs alongside the timing of the 520s usually isolates the cause.
- Cloudflare-specific, not an IANA/RFC status
- Means the origin returned an empty/unknown response
- Diagnose by testing the origin directly, bypassing the edge
How it appears in analytics and logs
A 520 from Cloudflare means the edge could not make sense of the origin's reply — empty response, dropped connection, or malformed headers. To crawlers it is a 5xx-style failure, so affected URLs are not indexed while it persists.
Diagnostic use case
Diagnose intermittent 520s by testing the origin directly, since the error indicates Cloudflare received a response it could not understand from your server.
What WebmasterID can help detect
WebmasterID surfaces the status codes crawlers receive at the edge, helping you spot Cloudflare 520s on pages that should be returning healthy 200s.
Common mistakes
- Assuming 520 is a standard HTTP code — it is Cloudflare-specific.
- Blaming Cloudflare's network when 520 points at the origin or the connection to it.
- Skipping a direct origin test, which is the fastest way to isolate the cause.
Privacy and accuracy notes
A 520 is an edge-to-origin status with no personal data. WebmasterID records the status crawlers received without linking it to a visitor identity.
Frequently asked questions
- Is 520 a standard HTTP status code?
- No. 520 is specific to Cloudflare's 52x error range and is not registered with IANA. It indicates the origin returned an empty or unexpected response that Cloudflare could not interpret.
Related pages
- Cloudflare 521 (Web Server Is Down)
HTTP 521 is a Cloudflare-specific status, not an IANA/RFC standard. Cloudflare returns 521 when it cannot establish a TCP connection to the origin — the origin actively refused the connection or is down. A frequent cause is the origin firewall blocking Cloudflare's IP ranges, or the web server process being stopped. It points squarely at origin reachability.
- Cloudflare 522 (Connection Timed Out)
HTTP 522 is a Cloudflare-specific status, not part of the IANA/RFC standards. Cloudflare returns 522 when the TCP connection to the origin timed out before it could be established — Cloudflare reached out but the origin did not complete the handshake in time. It usually reflects an overloaded origin, network/routing problems, or a firewall silently dropping packets.
- HTTP 502 Bad Gateway
502 Bad Gateway means a server acting as a gateway or proxy received an invalid response from an upstream server it was trying to reach. It points at a problem between layers — origin down, app crash, or a misconfigured proxy — rather than at the requested resource itself.
- Website observability
Spot edge-level Cloudflare errors crawlers receive, recorded server-side.
Sources and verification notes
- Cloudflare — Troubleshooting Cloudflare 5XX errors (520)Cloudflare-specific code; not in the IANA HTTP status registry.
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.