Before the TCP connection exists
- What Cloudflare waits for
- A SYN+ACK reply after sending a SYN
- Limit
- 19 seconds (SYN retries at 1, 1, 1, 1, 1, 2, 4 and 8 seconds)
Cloudflare error 522 means Cloudflare timed out contacting your origin. Learn the two timeouts behind it, the usual cause and how to fix it.
Cloudflare error 522 means Cloudflare timed out while contacting the origin web server. It is a Cloudflare-defined status, not standard HTTP. The most common cause is an origin firewall that rate limits or blocks Cloudflare's IP addresses. Others are an overloaded or offline server, disabled keepalives and a wrong origin IP in DNS.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
Both mean the origin or the network path to it did not reply. Cloudflare's connection limits page adds that these two rows are not an exhaustive list of what can produce a 522, and that a timeout while TLS setup is still pending can be reported as a 522 rather than a 525. If Cloudflare connected and the origin acknowledged the request but sent no response in time, you get a 524 instead. If the origin actively refused the connection, you get a 521.
A reload costs nothing and may work if the origin was briefly overloaded. A 522 that persists needs the owner to act.
If the page loads on mobile data or on someone else's connection, the problem is local. If it fails everywhere, the site has the fault.
Send the exact URL, the time with your timezone and the error code. Cloudflare lists those details for owners to give a hosting provider. Add the Ray ID if the error page shows one, since Cloudflare's log tools can filter by it.
.htaccess, iptables, host firewallsSome Cloudflare products add their own ways to get a 522. With Cloudflare Pages, check that a custom domain is set up and the CNAME points to your Pages domain. A Worker with a Custom Domain that fetches its own hostname causes a 522; Cloudflare suggests a Route targeting another hostname, or the global_fetch_strictly_public compatibility flag. With Origin Rules, the resulting hostname must resolve: an A record pointing to a reserved address such as 100:: or 192.0.2.0 returns a 522.
# From the origin: find recent Cloudflare connections in your access log,
# then trace the route back to one of those addresses
mtr -rwc 50 CLOUDFLARE_IP_FROM_YOUR_LOGSGoogle treats 5xx responses as server errors: its crawlers slow down, content returned with them is ignored, and URLs already indexed are kept for a while but eventually dropped if the errors persist. A 522 is a 5xx from the crawler's side, so a repeated one slows crawling. See 5xx server errors for how to trace the pattern and confirm recovery, and Google's documentation on how HTTP status codes affect its crawlers.
4 questions people ask next, answered from the sources on this page.
First confirm your host allows all Cloudflare IP ranges, the most common cause per Cloudflare. Then check the origin is online and not overloaded, keepalives are enabled, and the origin IP in Cloudflare DNS is correct.
Cloudflare gives up when it gets no SYN+ACK within 19 seconds of its SYN, or no acknowledgment of its resource request within 90 seconds after connecting. Both point to an unresponsive origin or network path.
No. A 504 Gateway Timeout is a standard HTTP status where a proxy got no response in time. A 522 is a Cloudflare-specific status for a timeout while contacting the origin, with defined TCP-stage limits.
No. Cloudflare says Cloudflare Support only assists the domain owner, and that a site visitor should report the problem to the site owner.
Run the free audit, then approve the fixes. Every change can be undone.