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
- You (reached)
- DNS (reached)
- Cloudflare edge (reached)
- Origin (not reached)
times out
Cloudflare cannot establish a timely connection to your origin.
What to do
- Check. Confirm your origin firewall or security group allows Cloudflare's published IP ranges.
- Fix. Allow Cloudflare's published IP ranges in your origin firewall.
curl https://www.cloudflare.com/ips-v4 >> /etc/allowed_ips - 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
- Check. Check your origin server's CPU/memory/connection-count metrics and any upstream network status around the time of the timeout.
- 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).
- 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.