HTTP 520 Unknown Error: What It Means and When You See It
Quick Answer
HTTP 520 Unknown Error is a Cloudflare-specific status meaning the origin server returned an unexpected, empty, or non-HTTP response to Cloudflare.
What HTTP 520 Means
HTTP 520 Unknown Error is a Cloudflare-specific status code meaning the origin server returned an unexpected, empty, or non-HTTP response to Cloudflare. The origin server is up (Cloudflare can connect) but the response is invalid. Common causes: the origin returned a response Cloudflare cannot parse, the origin closed the connection prematurely, the application crashed mid-response, or the origin is returning binary data on a plain HTTP connection.
Debugging HTTP 520
Bypass Cloudflare by connecting directly to the origin server IP. Check origin server logs for the time of the 520 - look for crashed processes, uncaught exceptions, or partial responses. Common causes: PHP/Node.js apps crashing mid-request (run out of memory), sending binary data without the correct Content-Type, and Nginx misconfiguration that closes upstream connections early. The Cloudflare Ray ID in the response headers helps identify the specific request in Cloudflare's error log.
Try the interactive tool
Convert any value instantly — no sign-up required
Frequently Asked Questions
Related Values
100
HTTP 100 Continue means the server has received the request headers and the client should proceed to send the request body. It is an interim response used to inform the client to continue.
101
HTTP 101 Switching Protocols indicates the server is switching to the protocol specified in the Upgrade header field. Commonly used when upgrading to WebSocket connections.
200
HTTP 200 OK is the standard success response. The request has succeeded and the server has returned the requested resource in the response body.
201
HTTP 201 Created means the request succeeded and a new resource was created as a result. The Location header typically points to the new resource URL.