HTTPfy

522 Connection Timed Out

Cloudflare: the TCP connection to the origin timed out.

522 at a glance

Code
522
Name
Connection Timed Out
Class
5xx Server error
Status
Non-standard used by Cloudflare
Documented by
Cloudflare
Cacheable by default
No by default. Caches only store responses with unrecognised status codes if explicit freshness (Cache-Control max-age) is given.

What 522 means

Cloudflare returns 522 when it could not complete the TCP handshake with the origin in time (no SYN-ACK came back), or the connection was established but the origin did not acknowledge the request in time. The origin is overloaded, unreachable, or dropping Cloudflare's packets.

What typically causes a 522

  • Origin firewall silently dropping (rather than rejecting) Cloudflare IP ranges.
  • Origin overloaded or out of connection slots.
  • DNS record in Cloudflare pointing to the wrong IP address.
  • Network problems or rate limiting at the hosting provider.

Fix it on the server

  • Allow Cloudflare IP ranges, check server load, and confirm the A/AAAA records in Cloudflare point at the origin.

Fix it as a client or visitor

  • Retry later; the fix is on the origin side.

Headers that go with 522

HeaderRole
CF-RAYRequest ID for troubleshooting.

Example response

HTTP/1.1 522
Server: cloudflare
Content-Type: text/html

Opens the HTTP headers tool with your URL filled in; it shows the status line and headers of every redirect hop.