Cloudflare Edge Errors

Cloudflare 520 Web Server Returned an Unknown Error

520
HighProxy

Web Server Returned an Unknown Error — the origin sent unexpected responses to the proxy

What 520 Means

The 520 error on the Cloudflare Edge Errors indicates web server returned an unknown error — the origin sent unexpected responses to the proxy. This typically occurs due to origin server crashed mid-response.

A 520 appears when Cloudflare reaches the origin but does not receive a response it can treat as valid HTTP. The network path exists and the connection starts, but the origin closes early, returns empty data, or sends malformed response metadata. That makes 520 different from reachability codes like 521 or 523, which fail earlier in the request chain.

Technical Background

The key signal in a 520 is that the edge service did connect to the origin. The failure happens after connection setup, when the proxy expects usable HTTP response data and instead gets an empty reply, truncated output, or response details that do not fit protocol expectations.

That separates 520 from 521 and 523. A 521 points to connection refusal at the origin boundary, while a 523 points to routing failure before the origin can be reached. A 520 sits closer to application output, origin middleware, or security tooling that interrupts the response mid-stream.

On live sites, 520 patterns often cluster around one app stack, one path family, or one recent deployment. When only proxied traffic triggers the error, the useful distinction is not 'Cloudflare versus site' but 'successful connection versus unusable origin response.'

Common Causes

  • Origin server crashed mid-response
  • Connection reset by a firewall at the origin
  • Empty response body returned by the web application
  • Exceedingly large response headers from the origin server

Typical Scenarios

  • A PHP process crashes and closes the socket while the proxy is waiting for the page HTML
  • A strict firewall silently drops established connections it flags as aggressive
  • An application produces headers exceeding the proxy's size limit

What to Know

A 520 usually points to an origin-side response problem rather than a broad internet outage. When many URLs fail with 520 at once, the pattern fits application crashes, malformed response output, or security layers that drop the response after the connection begins. When only one path family returns 520, the issue is often tied to that route, its headers, or a recent deploy touching that response path.

Frequently Asked Questions

Common questions about Cloudflare 520 error

It says the edge proxy reached the origin, but the origin did not return a response Cloudflare could treat as valid HTTP. The useful clue is successful connection followed by unusable response data.

It is usually closer to an origin response problem. Unlike 521 or 523, the request already made it far enough for normal response handling to begin.

A 521 points to refused origin connections, and a 523 points to an unreachable route to the origin IP. A 520 appears later, after connection setup, when the returned response cannot be used.