Cloudflare error 522: Connection Timed Out

Cloudflare couldn’t connect to the website’s server in time. This is an unofficial code used by Cloudflare. You won’t find it in the HTTP standard.

Connection Timed Out

5xx Server errorUnofficial: CloudflareCloudflare docs: error 522

Cloudflare couldn’t connect to the website’s server in time.

Example response
HTTP/2 522
server: cloudflare
cf-ray: 8f1c2a3b4d5e6f72-LHR
content-type: text/html; charset=UTF-8

<!DOCTYPE html>… Error 522: Connection timed out …

What 522 means

Unofficial, used by Cloudflare. Cloudflare timed out contacting the website’s own server: either the connection couldn’t be set up, or the server didn’t acknowledge the request once connected.

When servers send it

When the origin is overloaded, offline, dropping packets, or silently blocking Cloudflare. Cloudflare’s docs give 19 seconds for the connection and 90 seconds for the acknowledgement.

Common causes

  • A firewall silently dropping (rather than refusing) Cloudflare’s traffic.
  • An overloaded origin that can’t accept new connections.
  • The wrong origin IP address in Cloudflare’s DNS settings.
  • Keepalives disabled at the origin.

How to fix it as a developer

  • Check the A or AAAA record in Cloudflare points at the origin’s current IP address.
  • Allow Cloudflare’s IP ranges at every firewall in front of the origin.
  • Check the origin’s load: CPU, memory, connection limits.

How to fix it as a visitor

  • Try again in a few minutes.

Related codes

Where it’s defined

522 isn’t in any RFC or the IANA status code registry. It’s used by Cloudflare. Reference: Cloudflare docs: error 522.

Other 5xx codes

500 Internal Server Error · 501 Not Implemented · 502 Bad Gateway · 503 Service Unavailable · 504 Gateway Timeout · 505 HTTP Version Not Supported · 511 Network Authentication Required · 520 Web Server Returned an Unknown Error · 521 Web Server Is Down · 523 Origin Is Unreachable · 524 A Timeout Occurred · 525 SSL Handshake Failed · 526 Invalid SSL Certificate

Or search them all in the HTTP status code list.

Questions people ask

What does HTTP 522 Connection Timed Out mean?
Cloudflare couldn’t connect to the website’s server in time. It’s an unofficial code used by Cloudflare, not part of the HTTP standard.
What’s the difference between 522 and 524?
522: Cloudflare couldn’t connect to the origin in time (or got no acknowledgement). 524: it connected fine, but the origin took too long to send a response.
Does a 522 mean the site is down?
From Cloudflare’s point of view, yes: it can’t reach the website’s server. The server may be overloaded, offline, or blocking Cloudflare.
↑↓ move↵ openesc close