Cloudflare 520 Unknown Error

Plain-English meaning

Cloudflare reached origin but received an unexpected response.

Why it happens

Origin returned empty/invalid response or closed connection unexpectedly.

Common causes

  • Origin process crashes intermittently
  • Oversized/invalid response headers
  • Firewall intermittently blocks Cloudflare IPs
  • Origin HTTP/2 misconfiguration

What to check first

Correlate Cloudflare Ray ID with origin logs, validate headers, and confirm Cloudflare IP ranges are allowlisted.

How to fix it

Stabilize origin, correct header formatting/limits, and align origin protocol settings with Cloudflare mode.

Example signal

Error 520: Web server is returning an unknown error

Related links

404 · 429 · 500 · 502 · 503 · 504 · Cloudflare 522 · Nginx 499 · ERR_CONNECTION_REFUSED

Client errors hub · Server errors hub · Comparison pages · Homepage