Start free · Free tools · Fair usage limits
Browse Tools

Categories

Custom AI Solutions – AI2Flows
LIVE NEWS
Loading latest AI & SEO news…
Home›Tools›HTTP Status Codes Reference›Cloudflare Error 520 Web Server Returned an Unknown Error
5xx Server Error · non-standard

Cloudflare Error 520 Web Server Returned an Unknown Error

Cloudflare error 520 means the origin server returned an empty, unknown or unexpected response to Cloudflare. It is a catch-all: the origin crashed, reset…

Quick answer

Cloudflare error 520 means the origin server returned an empty, unknown or unexpected response to Cloudflare. It is a catch-all: the origin crashed, reset the connection, sent oversized headers or returned something Cloudflare could not parse.

Last updated · Maintained by FreeAIToolz · How we test

What does Cloudflare Error 520 Web Server Returned an Unknown Error mean?

Cloudflare reached your server but the response was invalid. Common triggers are an app crash, headers larger than Cloudflare’s limit (around 128 KB total), a firewall resetting Cloudflare’s connections, or an empty reply.

Status code520
NameWeb Server Returned an Unknown Error
Class5xx Server Error
Defined inCloudflare (non-standard)
Safe to retry automatically?Yes, with backoff

What causes Cloudflare Error 520?

  • The origin app crashed or closed the connection.
  • Response headers too large (many Set-Cookie headers).
  • A firewall or security module blocking Cloudflare IP ranges.

How do I fix Cloudflare Error 520?

  1. Check origin server logs at the time of the error.
  2. Allow Cloudflare IP ranges in the origin firewall.
  3. Reduce response header size (fewer or smaller cookies).
  4. Pause Cloudflare briefly to see the origin’s raw response.

What should a client do after Cloudflare Error 520?

Retry; if persistent, the site owner must fix the origin.

Does Cloudflare Error 520 affect SEO?

Googlebot sees it as a 5xx error. Persistent 520s reduce crawling and can remove pages from the index.

Other 5xx status codes

The server failed to fulfil a valid request. Retrying later, with backoff, is usually reasonable.

Frequently asked questions

Is error 520 a Cloudflare problem?
Usually not. Cloudflare is reporting that your origin server returned an invalid or empty response. Check the origin.
How do I debug Cloudflare 520?
Compare origin logs with the error time, check firewall rules for Cloudflare IPs, and test the origin directly (bypassing Cloudflare).
Is 520 a client or server error?
520 is in the 5xx class, a server error: the request may be fine, but the server (or the origin behind Cloudflare) could not complete it.