What does HTTP 520 mean?
Cloudflare received an empty, unknown or unexpected response from the origin server. A Cloudflare-specific catch-all: the origin reset the connection, sent headers that are too large or returned an empty reply.
5xx Server error: The request looked valid, but the server failed to fulfil it. The fix is on the server side.
Common causes of a 520 error
- Origin crashed or closed the connection.
- Response headers larger than Cloudflare allows (32 KB).
- Firewall on the origin blocking Cloudflare IPs.
How to fix 520 Web Server Returned an Unknown Error
- Check origin server logs at the time of the error.
- Allow Cloudflare’s IP ranges in the origin firewall.
520 and SEO
Treated like a 5xx error by search engines.
Example response
HTTP/1.1 520 Web Server Returned an Unknown Error
Related status codes
- 502 Bad Gateway — A gateway or proxy got an invalid response from the upstream server.
- 521 Web Server Is Down — Cloudflare could not connect to the origin server — the connection was refused.
- 522 Connection Timed Out — Cloudflare timed out while connecting to the origin server.
- 524 A Timeout Occurred — Cloudflare connected to the origin, but it did not send a response within 100 seconds.
Check which status code a URL returns with the HTTP header checker.