HTTP Proxy Error Codes: Origin Connectivity, Timeouts and SSL Troubleshooting
What CDN proxy errors 520–527 and 1xxx mean, when the origin is at fault, timeout limits, and how to diagnose with headers and analytics.
This page summarises Cloudflare documentation on HTTP errors visitors see on proxied sites: which codes Cloudflare generates versus the origin, how timeouts map to 522 and 524, TLS failures (525/526), and practical ways to narrow the cause before you contact a host or Cloudflare Support.
Cloudflare proxy errors versus origin HTTP errors
Section titled “Cloudflare proxy errors versus origin HTTP errors”A proxied site can fail in two different places. The origin may return a normal HTTP status (for example 500, 502, or 503) that Cloudflare passes through—often on a Cloudflare-branded error page when the origin sent that status. Cloudflare also generates its own 520–527 series when the edge cannot complete a valid conversation with the origin.
When troubleshooting most 5XX errors, the correct course of action is to first contact your hosting provider or site administrator to troubleshoot and gather data.
— Cloudflare, Cloudflare 5xx errors
For 502 and 504, branding on the error page matters:
If the error page is Cloudflare-branded, the 502 or 504 came from your origin web server instead.
— Cloudflare, Error 502 or 504
An unbranded 502 or 504 can occur due to a compression issue at the origin, such as when the origin server serves gzip-encoded compressed content but fails to update the content-length header, or if the origin is serving broken gzip compressed content.
— Cloudflare, Error 502 or 504
Many 4xx responses on orange-clouded zones come from the origin (404, 405, 410, 411) or from Cloudflare security (403 with WAF, Browser Integrity Check, or 1xxx codes in the body). Cloudflare does not generate 404 for customer sites—it proxies the origin response (Error 404).
Error 520–527: quick map for “site down behind a proxy”
Section titled “Error 520–527: quick map for “site down behind a proxy””The status codes analytics reference groups the 52x family by what broke between edge and origin:
| Code | Typical meaning |
|---|---|
| 520 | Origin returned something empty, malformed, or unexpected (Error 520) |
| 521 | Origin refused the TCP connection (Error 521) |
| 522 | TCP connect or early ACK timed out (Error 522) |
| 523 | Origin IP unreachable on the network path (Error 523) |
| 524 | Connected, but no HTTP response before Proxy Read Timeout (Error 524) |
| 525 | TLS handshake between Cloudflare and origin failed (Error 525) |
| 526 | Certificate not valid under Full (strict) (Error 526) |
Structured error payloads label categories for operators. From error responses:
| Category | Codes | Retry? |
|---|---|---|
origin |
502, 504, 520–524 | Yes; back off using retry_after when provided |
cloudflare |
500 | Yes; short retry |
ssl |
525, 526 | No until TLS is fixed |
Error 522 and Error 524: firewall and slow origin
Section titled “Error 522 and Error 524: firewall and slow origin”522 usually means Cloudflare never got a healthy TCP flow to the origin—often blocked Cloudflare IP ranges at the host firewall, wrong DNS A record, or an overloaded server dropping SYN packets.
524 means the TCP connection succeeded but the origin did not send an HTTP response in time:
Error 524 indicates that Cloudflare successfully connected to the origin web server, but the origin did not provide an HTTP response before the default 125 seconds Proxy Read Timeout.
— Cloudflare, Error 524
Interim 102 Processing responses can keep a long request alive: if Cloudflare receives 102 Processing, it expects a final response within 125 seconds or the visitor may see 522; interim 102 can help avoid 524 while work continues (1xx Informational).
Error 525 and Error 526: SSL/TLS mode at the origin
Section titled “Error 525 and Error 526: SSL/TLS mode at the origin”Both require Full or Full (strict) toward the origin:
Error 525 occurs when these two conditions are true: The SSL handshake fails between Cloudflare and the origin web server. Full or Full (Strict) SSL is set in the Overview tab of your Cloudflare SSL/TLS app.
— Cloudflare, Error 525
526 means Cloudflare cannot validate the origin certificate under Full (strict)—expired cert, wrong hostname, incomplete chain, or self-signed without trust configuration (Error 526). A temporary diagnostic step documented there is switching to Full (not strict) or installing a Cloudflare Origin CA certificate.
Connection limits: which timeout produces which code
Section titled “Connection limits: which timeout produces which code”Operators often assume one “connection timeout” covers everything. Cloudflare’s connection limits table ties specific timers to status codes:
| Limit | Seconds | HTTP code | Configurable |
|---|---|---|---|
| TCP connection establishment | 19 | 522 | No |
| TCP request acknowledgment | 90 | 522 | No |
| TCP Keep-Alive Interval | 30 | 520 | No |
| Proxy Idle Timeout | 900 | 520 | No |
| Proxy Read Timeout | 125 | 524 | Yes (Enterprise zones) |
| Proxy Write Timeout | 30 | 524 | No |
The same page notes that a timeout during pending TLS may surface as 522 rather than 525, and that reused connections and QUIC do not mirror a fresh TCP-plus-TLS setup for every request.
HTTP/2 to Origin aligns Proxy Read Timeout (default 125s, up to 6000s for Enterprise) with 524, and handshake timeouts with 522.
Always Online: when archived pages appear
Section titled “Always Online: when archived pages appear”Always Online is not a substitute for fixing the origin. It activates only when Cloudflare cannot connect to the origin (responses in 520–527 from Cloudflare), not when the origin is up but returns 404, 503, or 500:
Always Online only activates when Cloudflare cannot connect to your origin — it does not activate when the origin is reachable but returning error responses.
— Cloudflare, Always Online
With Internet Archive integration, visitors may see an archived copy and a refresh control; dynamic features (carts, comments, POST forms) still fail (Always Online limitations). New zones may wait 24–72 hours for DNS propagation and an initial crawl before the feature is fully useful.
If the origin is reachable but cache cannot be revalidated, responses may be served as STALE—expired cache because Cloudflare could not contact the origin (cache responses).
1xxx and DNS errors in the HTML body
Section titled “1xxx and DNS errors in the HTML body”Many visitor-facing “Access denied” screens use a numeric 1xxx code in the page body (often with HTTP 403). These are Cloudflare edge decisions, not origin application errors (Error 403).
Common situations from the cluster:
| Code | Meaning (short) | Owner action |
|---|---|---|
| 1000–1002 | DNS points to prohibited or wrong IP (e.g. Cloudflare anycast IP on A record) | Fix DNS; avoid double-proxy loops (Error 1000, Error 1002) |
| 1001 | DNS resolution failure | Fix resolution; may appear as HTTP 409 (Error 1001, Error 409) |
| 1015 | Rate limiting | Visitor waits; owner tunes rules (Error 1015) |
| 1016 | Origin DNS error from Cloudflare’s perspective | Valid A/CNAME, resolvable targets (Error 1016) |
| 1020 | Security feature blocked request | Match Ray ID in Security Events (Error 1020) |
| 1034 | Edge IP restriction (EIV / BYOIP maps) | Fix Address Map membership (Error 1034) |
HTTP 530 wraps an underlying 1xxx when Cloudflare cannot resolve the origin hostname (Error 530).
Site-owner blocks by country, ASN, IP, or browser signature (1005–1012) cannot be overridden by Cloudflare Support—the owner must change IP Access Rules or related settings.
cf-error-type headers: classify the failure in one request
Section titled “cf-error-type headers: classify the failure in one request”Response headers speed triage. Reproduce the error and inspect headers with curl -v, browser Network tabs, or a HAR export (Cloudflare error diagnostic headers).
cf-error-type prefix |
Layer | Next step |
|---|---|---|
1xxx |
DNS / routing | Check DNS; ensure no A record points at a Cloudflare IP |
1101 / 1102 |
Workers runtime | Use wrangler tail for exceptions |
52x |
Origin connectivity | Origin up, firewall allows Cloudflare, correct IP and port |
Origin Analytics and bypass tests: prove where the fault is
Section titled “Origin Analytics and bypass tests: prove where the fault is”Origin Analytics compares what the origin returned (originResponseStatus) with what visitors saw (edgeResponseStatus). Documented flows include: 524 → response-time P95 near timeout; 522 → TCP failures; 520 → origin 200 but edge 520 (malformed response) (common diagnostic flows).
To test the origin without the proxy, Cloudflare recommends curling the origin IP directly:
curl -svo /dev/null http://example.com --connect-to ::203.0.113.34See Gathering information for troubleshooting sites. If the same failure appears on a direct origin test, the host must investigate—including load balancers and firewalls between Cloudflare and the server (Cloudflare 5xx errors).
When opening a support case for 520 or branded 502/504, document the URL, timestamp with timezone, cf-ray, output of https://<YOUR_DOMAIN>/cdn-cgi/trace, and HAR files with Cloudflare on and paused where applicable (Error 520, Error 502 or 504).
Load Balancer and Health Check failures
Section titled “Load Balancer and Health Check failures”Monitors that probe the wrong host, expect the wrong status codes, or use HTTP while the origin redirects to HTTPS will look like origin outages (common error codes, Health Checks analytics). A hostname that resolves to an orange-clouded Cloudflare IP probes the edge, not your server—the fix is to aim checks at the origin IP or a grey-cloud hostname (Health Checks analytics).
Common mistakes
Section titled “Common mistakes”- Treating origin 5xx as “CDN down.” A reachable origin returning 500/503 does not trigger Always Online; only connection-level 520–527 from Cloudflare do (Always Online).
- Blocking Cloudflare at the origin while orange-clouding DNS—the top cause of 521/522 (Error 521, Error 522).
- Pointing DNS A records at Cloudflare anycast IPs instead of the host IP (1000/1002) (Error 1000).
- AWS VPC routes that swallow 172.64.0.0/13 traffic toward a private path, producing 523 (Error 523).
- Long-running exports through the proxied hostname instead of a grey-cloud subdomain or a raised Enterprise Proxy Read Timeout (Error 524, proxy status).
- Misattributing visitor TLS issues to the origin when only some networks fail—corporate middleboxes and UDP/QUIC blocks are documented under ERR SSL PROTOCOL ERROR (disable HTTP/3 or TLS 1.3 temporarily as a test, then re-enable).
For crawlers and bots hitting timeout or reset errors before any HTTP status exists, firewall and path analysis applies similarly: review broad block rules and packet captures (Debug network and DNS errors for Google’s crawlers).
How to check this on your site
Section titled “How to check this on your site”-
Reproduce the failure and record the exact HTTP status, Ray ID, URL, and time zone. Open the response headers and note
cf-ray,cf-error-type, and whether the HTML mentionscloudflare(Cloudflare error diagnostic headers, Error 503). -
Run
curl -svo /dev/nullagainst the site and, if you know the origin IP, repeat with--connect-toto bypass the proxy (Gathering information for troubleshooting sites). -
In the Cloudflare dashboard, open Origin Analytics and compare origin versus edge status codes and response times for the failing path.
-
Confirm DNS A/AAAA records point at the real host, orange-cloud status matches your intent, and SSL mode matches what the origin supports (Troubleshooting a slow website, Error 525).
-
You can check automatically in Answerwell (our tool): https://answerwell.org/workspace
Report an error or ask a question
Section titled “Report an error or ask a question”If something on this page is wrong or unclear, email yimasynthetic@gmail.com with the page URL and the exact sentence you are questioning so it can be corrected or explained.