Cloudflare Error 522: Connection Timed Out

Share
Ongoing All Updated November 13, 2026Based on 3 user reportsHow we research

Quick answer

Error 522 means Cloudflare could not complete a TCP connection to your origin in time. The most common cause is the origin firewall blocking or rate limiting Cloudflare IPs.

Most likely fix: Allow Cloudflare IPs at the origin

How to fix it

Try these in order — the most common fix is first.

  1. 1. Allow Cloudflare IPs at the origin

    1. Allow all ranges from cloudflare.com/ips in .htaccess, iptables or your host firewall
    2. Disable rate limiting or fail2ban rules that ban those IPs
    Did this fix it?
  2. 2. Check the origin and its IP

    1. Confirm the server is not overloaded and keepalive is enabled
    2. In DNS, check the A record matches the IP your host assigned
    Did this fix it?
  3. 3. Workers and Pages cases

    1. For Workers on a custom domain, do not fetch your own hostname; use a route on another hostname or the global_fetch_strictly_public flag
    2. For Pages, confirm the custom domain CNAME points to your Pages domain
    3. Make sure Origin Rule hostnames do not resolve to 100:: or 192.0.2.0
    Did this fix it?
  4. 4. Collect evidence for support

    1. Run an MTR or traceroute from the origin to a Cloudflare IP seen in your logs
    2. Check Origin Analytics for paths with high TCP failure rates
    Did this fix it?

Symptoms

Visitors see 'Error 522 Connection timed out' on a proxied site; the origin may be fine when accessed directly.

Why it happens

  • Origin firewall blocking or rate limiting Cloudflare IP ranges
  • Origin overloaded, offline or dropping packets
  • Wrong origin IP in Cloudflare DNS
  • Worker fetching its own hostname, or an Origin Rule pointing to a reserved address

This guide also covers

  • cloudflare error 522
  • connection timed out cloudflare
  • 522 cloudflare wordpress

Still not working?

If Cloudflare keeps failing, you're not alone. See every Cloudflare problem users report or the alternatives people switch to.

Have an app idea? Our small team builds any software: web and mobile apps, games, desktop, AI tools. Price agreed together.

Talk to us
Fixed it? Share this guide

Other Cloudflare errors

All 15 Cloudflare errors and fixes →