# Cloudflare Error 522: Connection Timed Out

> Cloudflare's TCP connection to the origin server timed out.

522 means Cloudflare tried to open a TCP connection to the origin and got no answer before its connection timeout. Packets went missing somewhere: a firewall silently dropping Cloudflare's traffic, a DNS record pointing at the wrong IP, or a server too overloaded to accept new connections.

- Class: unofficial (Cloudflare)
- Retry: With backoff (idempotent requests only)
- Cacheable by default: no
- Defined in: [Cloudflare docs — Troubleshooting Cloudflare 5XX errors](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/)

## Example response

```http
HTTP/1.1 522 Connection Timed Out
Content-Type: application/json
Content-Length: 32

{"error":"Connection Timed Out"}
```

## Common causes

- An origin firewall dropping (not rejecting) Cloudflare's IP ranges.
- The Cloudflare DNS record points at an old or wrong origin IP.
- The origin is overloaded or out of connection slots.
- Network or routing problems at the hosting provider.

## How to fix it

1. Confirm the A/AAAA record in Cloudflare points at the current origin IP.
2. Allow Cloudflare's IP ranges, and check rate limiters aren't blocking them.
3. Check origin load and connection limits.
4. If the server is up but unreachable, contact the host.

## FAQ

### My server is up — why do I get 522?

Cloudflare can't reach it. Most often a firewall drops Cloudflare's traffic, or the DNS record still points at an old IP.

## Related status codes

- [521 Web Server Is Down](https://www.devkult.com/http/521.md)
- [524 A Timeout Occurred](https://www.devkult.com/http/524.md)
- [504 Gateway Timeout](https://www.devkult.com/http/504.md)

Open the interactive page: https://www.devkult.com/http/522