Connection timed out 522

Reference guide

Does your origin server respond fine when you bypass Cloudflare (hit it directly)?

Yes, origin responds fine directly

Request path

  1. You (reached)
  2. DNS (reached)
  3. Cloudflare edge (reached)
  4. Origin (not reached)

times out

Cloudflare cannot establish a timely connection to your origin.

What to do

  1. Check. Confirm your origin firewall or security group allows Cloudflare's published IP ranges.
  2. Fix. Allow Cloudflare's published IP ranges in your origin firewall.
    curl https://www.cloudflare.com/ips-v4 >> /etc/allowed_ips
  3. Verify. Retry the request through Cloudflare and confirm the error is resolved.

No, origin is slow/unreachable too

The connection problem exists at your origin independent of Cloudflare, since it's also slow or unreachable when accessed directly.

What to do

  1. Check. Check your origin server's CPU/memory/connection-count metrics and any upstream network status around the time of the timeout.
  2. Fix. Address the underlying origin performance or connectivity issue (scale resources, restart a hung process, or contact your hosting provider if it's network-level).
  3. Verify. Confirm the origin responds quickly when accessed directly, then retry through Cloudflare.

Want to narrow it down interactively instead? Use the error lookup tool.