# Error 522 "Connection timed out": what it means and how to fix it

> Error 522 means Cloudflare couldn't reach the website's own server within 19 seconds. It's not your device. What visitors can do, and how owners fix it.

Source: https://checkifsitedown.com/guides/error-522-connection-timed-out

By [Werner](https://checkifsitedown.com/about#editor) Reference 6 min read Updated 18 October 2026

"Error 522: Connection timed out" is a Cloudflare error page. It means Cloudflare, which sits in front of the website, tried to connect to the website's own server and got no reply in time. Your browser and Cloudflare are both working; the problem is the server behind them. Here's what that means if you're just visiting, and exactly what to check if it's your site.

Quick answer

**In short:** the website's own server isn't answering, so Cloudflare can't fetch the page for you.

**Can you fix it?** No. Your device, browser and internet are fine, so clearing your cache or restarting your router won't help.

**What to try:**

1. Wait a few minutes and reload. Many 522s clear up on their own.
2. [Check if the site is down for everyone](https://checkifsitedown.com/).
3. If it's your website, jump to the fixes for site owners.

![Diagram: the browser reaches Cloudflare, but the website's server does not reply within 19 seconds, causing error 522; common causes are a firewall blocking Cloudflare, an overloaded server or the wrong IP in DNS](https://checkifsitedown.com/assets/img/guide-error-522.svg?v=1.9.13)

## What error 522 means

Millions of websites use Cloudflare as a front door: visitors connect to Cloudflare, and Cloudflare fetches the page from the site's own server (called the *origin*). A 522 appears when that second step fails. According to Cloudflare, it happens when:

- the origin server doesn't answer Cloudflare's connection request within **19 seconds**, or
- a connection opens but the origin doesn't acknowledge Cloudflare's request within **90 seconds**.

Either way, the website is effectively Down for everyone going through Cloudflare, even though Cloudflare itself is fine.

## If you're visiting the site

A 522 is **not caused by your device, browser or internet connection**, so clearing your cache or restarting your router won't help. What you can do:

1. **Wait a few minutes and reload.** Many 522s are caused by a brief traffic spike or a server restart and clear up on their own.
2. **Check the site on [CheckIfSiteDown](https://checkifsitedown.com/)** to confirm it's down for everyone and not just a blip on your end.
3. **Let the owner know** if it lasts more than an hour and you have a way to contact them, such as their social media or support email. They may not have noticed.

If *many different* websites show Cloudflare errors at once, Cloudflare itself may be having trouble; its official status page is `cloudflarestatus.com`. With a 522 on one site, though, the fault is almost always that site's server.

## If it's your website: the causes, most common first

### 1. Your server or firewall is blocking Cloudflare

Cloudflare calls this the most common cause. Because every visitor now arrives through a small set of Cloudflare addresses, security tools can mistake that traffic for an attack and block or rate-limit it. Look at:

- firewalls such as iptables, UFW, CSF or your host's firewall panel;
- intrusion tools like fail2ban or ModSecurity, which may have banned Cloudflare IPs;
- `.htaccess` or server rules that deny IP ranges or countries.

**Fix:** allow all of Cloudflare's IP ranges, published at `cloudflare.com/ips`, and ask your host to do the same on their network firewall. If you need to block countries, do it in Cloudflare's own firewall rules instead of at your server.

### 2. The server is overloaded or offline

A server that's down, out of memory or swamped with requests drops new connections. **Fix:** check your hosting dashboard for outages and resource limits (CPU, memory, entry processes), restart the web server if needed, and look at the server's error logs around the time the 522s started. If traffic is the problem, Cloudflare caching rules can take a lot of load off the origin.

### 3. Cloudflare has the wrong server address

If you moved hosts or your server's IP changed, the A or AAAA record in Cloudflare's DNS settings may still point at the old address, where nothing answers. **Fix:** in the Cloudflare dashboard, open **DNS > Records** and make sure each proxied record (orange cloud) points to the IP your host currently gives you.

### 4. Keep-alive is disabled or packets are being dropped

Cloudflare reuses connections to your server, so it expects HTTP keep-alive to be on. Network problems between your host and Cloudflare can also drop packets. **Fix:** confirm keep-alive is enabled in your web server configuration. For network problems, ask your host to investigate; Cloudflare suggests running a traceroute or MTR from your server to a Cloudflare IP and sharing the results.

## How to test the origin directly

To prove whether the problem is your server or the path between it and Cloudflare, bypass Cloudflare from your own computer. Replace the address and domain below with yours:

`curl -I --resolve example.com:443:203.0.113.10 https://example.com/`

This sends the request straight to your server's IP while still asking for your domain. If it times out too, the server or its firewall is the problem. If it answers instantly, the server is fine and something is blocking or dropping traffic from Cloudflare specifically: go back to cause 1.

## 522 and its relatives

| Error | What happened |
| --- | --- |
| **521** Web server is down | The origin actively *refused* the connection: the server is up, but the web server software isn't running or is rejecting Cloudflare. |
| **522** Connection timed out | The origin never *answered* the connection at all. |
| **523** Origin is unreachable | Cloudflare can't find a route to the origin, often a DNS or network problem. |
| **524** A timeout occurred | The connection worked, but the page took too long to generate (about 100 seconds by default). |

For the full list, including 520, 525 and 526, see our [HTTP status codes guide](https://checkifsitedown.com/guides/http-status-codes-explained#cloudflare). If you're seeing a plain **504 Gateway Timeout** instead, our guide to [502 vs 503 vs 504](https://checkifsitedown.com/guides/502-vs-503-vs-504) explains the difference.

About the editor

Werner Editor, CheckIfSiteDown

Werner is a software engineer with a BSc in Computer Science and an avid interest in computer science, AI, programming and technology. He edits the guides on CheckIfSiteDown.

## More guides

- [500 Internal Server Error and "This page isn't working": what happened and what to do](https://checkifsitedown.com/guides/error-500-internal-server-error): 7 min read
- ["Site not allowed" and "This site is blocked": who's blocking you and what to do](https://checkifsitedown.com/guides/site-not-allowed): 6 min read
- [What is my IPv4 address, and why do I have an IPv6 address too?](https://checkifsitedown.com/guides/what-is-my-ipv4-address): 6 min read
- [WebRTC leaks explained: what they are, how to test for one and how to fix it](https://checkifsitedown.com/guides/webrtc-leaks-explained): 6 min read
- [Error 440 "Login Time-out": what it means in Outlook Web Access and how to fix it](https://checkifsitedown.com/guides/error-440-login-timeout): 6 min read
- [Error 494 "Request Header Or Cookie Too Large": what it means and how to fix it](https://checkifsitedown.com/guides/error-494-request-header-too-large): 6 min read
- [Error 530 and Cloudflare error 1016: what they mean and how to fix them](https://checkifsitedown.com/guides/error-530-origin-dns-error): 6 min read
- [Error 403 Forbidden: why you're blocked and how to fix it](https://checkifsitedown.com/guides/error-403-forbidden): 6 min read
- [DNS_PROBE_FINISHED_NXDOMAIN: what it means and how to fix it](https://checkifsitedown.com/guides/dns-probe-finished-nxdomain): 6 min read
- [ERR_CONNECTION_REFUSED: what it means and how to fix it](https://checkifsitedown.com/guides/err-connection-refused): 6 min read
- [Error 429 "Too Many Requests": what it means and how to fix it](https://checkifsitedown.com/guides/error-429-too-many-requests): 6 min read
- [502 vs 503 vs 504: what's the difference between these server errors?](https://checkifsitedown.com/guides/502-vs-503-vs-504): 6 min read
- ["This site can't be reached": browser connection errors explained and fixed](https://checkifsitedown.com/guides/this-site-cant-be-reached-errors-explained): 8 min read
- [Websites not working abroad? How to fix geo-blocks, banking and streaming when you travel](https://checkifsitedown.com/guides/websites-not-working-abroad): 7 min read
- [Website blocked on school, work or public Wi-Fi? Why it happens and what you can do](https://checkifsitedown.com/guides/websites-blocked-on-school-work-public-wifi): 8 min read
- [How to change your DNS server on Windows, Mac, iPhone, Android and your router](https://checkifsitedown.com/guides/how-to-change-dns-server): 7 min read
- [Website up but blocked for you? How a VPN gets you through (and when it won't)](https://checkifsitedown.com/guides/website-blocked-try-a-vpn): 7 min read
- [Why website checkers report false "down" results — and how to read them](https://checkifsitedown.com/guides/why-site-checkers-get-false-down-results): 6 min read
- [HTTP status codes explained: 403, 404, 500, 503 and Cloudflare 52x errors](https://checkifsitedown.com/guides/http-status-codes-explained): 7 min read
- [Is it down for everyone or just me? A 60-second troubleshooting guide](https://checkifsitedown.com/guides/is-it-down-or-just-me): 5 min read
