Skip to content

520 Web Server Returned an Unknown Error ​

Meaning ​

A Cloudflare-specific status indicating that the origin server returned an unexpected or unknown response. It’s essentially a catch-all when the origin’s response is something Cloudflare doesn't know how to handle (not a standard HTTP response).

When to Use ​

Used by Cloudflare's reverse proxy service when the origin server responds with something that is empty or not recognizable as a valid HTTP response, or closes the connection unexpectedly. It tells the client that something went wrong but the details are not clear.

Example ​

If Cloudflare requests content from an origin server and the server responds with gibberish or an empty response (not even headers), Cloudflare will return a 520 error to the client to indicate an unknown error at the origin.

When Not to Use ​

Do not use outside of Cloudflare or similar proxy contexts. As a client or origin developer, if you see a 520, it usually means the issue is with the origin server's response, not a code you'd intentionally send. For standard servers, prefer using explicit 5xx errors.

Source ​

Unofficial (Cloudflare)


Released under the MIT License.