520 Web Server Returned an Unknown Error
A Cloudflare catch-all for an empty, unexpected, or invalid response from the origin server.
What it means
HTTP 520 is a non-standard status used by Cloudflare when the origin server returns something Cloudflare cannot make sense of — an empty reply, an unexpected response, a connection reset, or a violation of HTTP that does not fit a more specific 52x code. It is essentially Cloudflare's way of saying the origin behaved in a way it could not interpret.
When it happens
It happens when the origin server crashes mid-response, sends malformed headers, drops the connection, or returns an empty answer. Large headers or cookies and origin-side application crashes are common triggers.
How to fix it
- Check the origin server's error and access logs for crashes or malformed responses around the time of the error.
- Look for oversized response headers or cookies that may break the connection.
- Confirm the origin is up and responding correctly when requested directly, bypassing Cloudflare.
- Review server resource limits and application errors that could cause the origin to fail mid-response.
SEO impact
Damaging if sustained. To a crawler a 520 looks like a server error, so affected pages will not be indexed and repeated occurrences can slow crawling. Fix the origin promptly.
Find out which of your URLs return 520
Paste a list of URLs and Sitewell checks the status code of every one at once — free and without signup.
Related codes
A generic error meaning the server encountered an unexpected condition.
501 Not ImplementedThe server does not support the functionality required to fulfil the request.
502 Bad GatewayA server acting as a gateway received an invalid response from the upstream server.
503 Service UnavailableThe server is temporarily unable to handle the request, often due to overload or maintenance.
504 Gateway TimeoutA gateway server did not receive a timely response from the upstream server.
505 HTTP Version Not SupportedThe server does not support the HTTP protocol version used in the request.
Related guides
A plain-English primer on HTTP status codes for SEOs: what the 2xx, 3xx, 4xx, and 5xx families mean, which ones affect rankings, and the codes worth knowing.
How to find and fix broken linksA practical walkthrough for finding broken links on your site, working out why each one breaks, and fixing them so visitors and crawlers stop hitting dead ends.