What it means
Cloudflare-specific: the origin server returned an empty, unknown or unexpected response.
Common causes
- Origin crashed or reset the connection
- Response headers larger than Cloudflare allows
- Firewall on the origin blocking Cloudflare IPs
How to fix it
As a client or visitor
Retry later; the problem is between Cloudflare and the site's server.
As the site or API owner
Check origin logs, allowlist Cloudflare IP ranges, and keep response headers small.
Example response
HTTP/1.1
HTTP/1.1 520 Web Server Returned an Unknown Error
Date: Tue, 07 Oct 2025 09:30:00 GMT
Server: nginx
Content-Length: 0 Specification
Not in the IANA registry; used by Cloudflare. Cloudflare
FAQ
› Is 520 a Cloudflare problem?
Usually not; Cloudflare reports that the origin answered with something it could not use.
› What header size limit causes 520?
Cloudflare rejects very large response headers (around 32 KB in total), often from oversized cookies.