Skip to content

Cloudflare error diagnostic headers

When Cloudflare generates an error page (as opposed to forwarding an error from your origin server), the response includes two diagnostic headers:

  • cf-error-type: Identifies the error category. Common values:
    • 1000 — DNS resolution failure (A record points to a Cloudflare IP)
    • 1016 — Origin DNS error (CNAME target does not resolve)
    • 1101 — Worker threw an unhandled exception
    • 1102 — Worker exceeded resource limits (CPU or memory)
    • 52x — Origin connectivity error (521, 522, 523, 524, 525, 526)
  • cf-error-origin: Identifies which Cloudflare system generated the error.

These headers are present only on Cloudflare-generated error pages, not on errors forwarded from your origin server.

How to capture these headers

Reproduce the error and inspect response headers using one of:

  • curl -v https://example.com — look for cf-error-type in the response headers
  • Browser DevTools: select Network > select the failing request > Headers
  • Export a HAR file and inspect the response headers

Using cf-error-type for diagnosis

cf-error-type prefixOriginNext step
1xxxDNS / routing layerCheck DNS records; verify no Cloudflare IP in A record
1101 / 1102Workers runtimeCheck wrangler tail for the exception
52xOrigin connectivityCheck origin server is up and reachable