Web server returns an unknown error 520

Reference guide

Did this happen on one specific page or endpoint, or across your whole site?

One specific page or endpoint

Request path

  1. You (reached)
  2. DNS (reached)
  3. Cloudflare edge (reached)
  4. Origin (answered with a warning)

520

Cloudflare received a response from your origin that didn't look like a valid HTTP response for this particular request.

What to do

  1. Check. Reproduce the failing request directly against your origin (bypassing Cloudflare) and inspect the raw response headers/body.
  2. Fix. Fix the malformed response from your application code (e.g. missing/invalid headers, a crashed process mid-response, or a proxy misconfiguration on that route).
  3. Verify. Retry the same request through Cloudflare and confirm it now returns a normal response.

Across the whole site

Request path

  1. You (reached)
  2. DNS (reached)
  3. Cloudflare edge (reached)
  4. Origin (answered with a warning)

520

Something at the origin — the web server process, a reverse proxy in front of it, or the app server itself — is returning responses Cloudflare can't parse for most or all requests.

What to do

  1. Check. Check your origin web server's error logs for crashes or malformed-response warnings around the time this started.
  2. Fix. Restart the origin web server/app process and review its configuration (e.g. proxy_pass settings, response buffering) for anything recently changed.
  3. Verify. Retry a few different pages through Cloudflare and confirm none return 520.

Want to narrow it down interactively instead? Use the error lookup tool.