Cloudflare Error Code 520
The origin returned an empty, unknown or malformed response.
The origin returned an empty, unknown or malformed response.
| Code | 520 |
| Product | Cloudflare |
| Company / origin | Cloudflare · United States |
| Category | Cloud & DevOps |
| Platform / versions | Cloudflare edge and origin · Current edge and origin |
| Severity | error |
| Official source | Cloudflare 5xx errors: Error 520 ↗ |
| Last verified | 2026-11-17 |
What does Cloudflare error 520 mean?
Cloudflare Error 520 means the origin did not return a response Cloudflare could parse. Typical causes are an origin crash, a firewall blocking Cloudflare IPs, malformed headers or an origin that speaks HTTP/2 incorrectly.
Common causes
- The origin process crashed or returned an empty response.
- A firewall, security plugin or origin ACL blocks Cloudflare IP ranges.
- Response headers exceed 128 KB or the origin's HTTP/2 support is misconfigured.
How to fix it
- Step 1
Check origin error logs for crashes, empty responses and malformed headers.
- Step 2
Allow Cloudflare IP ranges at the origin firewall and security layer.
- Step 3
If the origin advertises HTTP/2 through ALPN but does not support it, disable HTTP/2 to Origin or fix the server configuration.
When to escalate
Related codes
| Code | Name | What it means |
|---|---|---|
500 | Internal Server Error | The origin web server could not complete the request. |
522 | Connection Timed Out | Cloudflare could not open a TCP connection to the origin in time. |
Source & verification
This page was checked against Cloudflare 5xx errors: Error 520 on 2026-11-17. The code, product, and platform fields are kept separate from the explanation so corrections can be made without changing the URL.
Open Error Codes is independent and not affiliated with Cloudflare. Always confirm destructive or security-sensitive steps with the official documentation.