Skip to content
5xx · Server Error

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.

Check it with Sitewell

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

Related guides