Cloudflare Edge Errors

Proxy15 error codes

Reference list of 15 Cloudflare edge errors with meanings, common causes, and related context.

About Cloudflare Edge Errors

Cloudflare edge errors are generated by Cloudflare's proxy network, not by the origin server. They fall into two ranges: 5xx codes (520–527) that indicate connection or protocol failures between Cloudflare and the origin, and 1xxx codes (1000–1020) that cover DNS resolution failures, WAF blocks, rate limiting, and configuration errors at the edge itself. None of these codes appear in RFC 9110.

The 5xx edge codes describe specific points of failure in the TCP and TLS handshake between Cloudflare and the origin. Error 520 means the origin returned a response that was empty, too large, or otherwise unparseable. Error 521 means the origin actively refused the TCP connection (RST or no listener). Error 522 means the TCP handshake timed out — Cloudflare sends a SYN and retries with a backoff schedule (1, 1, 1, 1, 1, 2, 4, 8 seconds) before giving up at roughly 19 seconds for pre-connection or 90 seconds for post-connection ACK. Error 523 means DNS resolution at the edge could not find a network path to the origin IP. Error 524 means the TCP connection succeeded but the origin did not return a complete HTTP response within the Proxy Read Timeout, which defaults to 100 seconds on Free and Pro plans.

This collection documents 15 Cloudflare edge error codes, covering origin connectivity failures (520–524), SSL handshake errors (525–527), DNS and configuration errors (1000–1002, 1016), and edge-level access controls (1015, 1020). Each entry explains the specific failure point Cloudflare measured, the timeout or condition that triggered the code, and how it differs from the nearest standard HTTP server error.

Severity

Showing 15 of 15 error codes

Frequently Asked Questions

Error 521 means the origin server actively refused the TCP connection — the server is down, the port is not listening, or a firewall is sending RST packets. Error 522 means the TCP handshake timed out — Cloudflare sent SYN packets but never received a SYN+ACK, or the connection was established but the origin never acknowledged the request. A 521 indicates the origin is definitively unreachable; a 522 indicates it is slow or silently dropping packets.

Error 524 means the TCP connection to the origin succeeded and Cloudflare sent the HTTP request, but the origin did not return a complete response within the Proxy Read Timeout (100 seconds on Free and Pro plans, up to 6000 seconds on Enterprise). This indicates a slow application, long database query, or heavy server-side processing. Error 522, by contrast, means the TCP connection itself never completed — the origin never responded to the SYN packet at all.

The origin server itself produces a standard HTTP 500 (Internal Server Error) when the application throws an unhandled exception. Cloudflare error 520 means the origin returned a response that Cloudflare could not parse at all — empty body, missing headers, oversized headers exceeding the 16 KB limit, or a malformed HTTP response. The origin could be crashing, returning raw binary data, or sending headers that violate HTTP framing.