Error 522: Connection Timed Out
Error 522 is the Cloudflare message “connection timed out”. It appears when Cloudflare cannot complete a connection to the origin web server in time. This page explains what it means, what usually causes it and what you can do about it, as a visitor or as the owner of the site.
- Error code
- 522
- Cloudflare message
- Connection timed out
- HTTP status
- 522
- Who can fix it
- The site owner
- Official reference
- Cloudflare documentation for error 522
What error 522 means
Cloudflare sent a connection request and waited, but the server did not answer within the limit. Unlike a refused connection, the request simply went unanswered.
Cloudflare sits between the visitor and the web server of the site, which is called the origin. When something fails on that path, Cloudflare shows its own error page instead of the site. So error 522 comes from Cloudflare's network, not from your browser or your device.
What causes error 522
- A firewall, an .htaccess rule or an iptables rule drops or rate limits Cloudflare IP addresses, which is the most common cause.
- The server is overloaded or offline and drops incoming requests.
- The IP address in the Cloudflare DNS record no longer matches the real address of the server.
- Keepalive connections are disabled on the origin web server.
More than one of these can be true at the same time. Therefore start with the most recent change, because an error that appears right after a deployment, a DNS edit or a new firewall rule usually comes from that change.
How to fix error 522 as a visitor
Nothing on your device causes this, so wait a few minutes and reload.
In any case, reload the page once and try again a few minutes later. If the error stays, tell the site owner and include the Ray ID shown at the bottom of the error page, because it lets them find your exact request.
How to fix error 522 as the site owner
- Allow every Cloudflare IP range at the server, the firewall and the hosting provider.
- Check the server load and free up CPU, memory or connection slots.
- Confirm that the A or AAAA record in Cloudflare DNS points to the current server address.
- Enable keepalive on the web server, then ask the host for a traceroute to Cloudflare if the error stays.
If none of these steps helps, collect the Ray ID, the time of the error and the affected URL. Then send them to your hosting provider first, since many causes sit on the server side. Cloudflare Support only works with the owner of the domain.
Where to find the details
Every Cloudflare error page shows a Ray ID, which is a unique identifier for that single request. In the Cloudflare dashboard, the site owner can search for it in the security events or in the logs. As a result, a vague report turns into one exact request with its time, location and rule.
For that reason, a screenshot of the whole error page is the most useful thing a visitor can send. It contains the code, the Ray ID, the time and the Cloudflare location that answered.
On the server side, compare the time of the error with the web server and firewall logs. Also check any load balancer, proxy or security plugin that sits between Cloudflare and the application, because the cause is often there.
How error 522 differs from other Cloudflare errors
Cloudflare uses two families of codes. Codes from 520 to 530 mean that Cloudflare reached out to the origin server and something went wrong on the way or in the answer. Codes from 1000 upwards mean that Cloudflare itself stopped the request, usually because of a DNS setting or a security rule.
Standard codes such as 500, 502, 503 and 504 are different again, because they can also come straight from the origin server. If the page carries Cloudflare branding and a Ray ID, Cloudflare produced it. Otherwise the origin did.
The related codes below are the ones most often confused with error 522, so check them if the description here does not match what you see.
Does error 522 affect search rankings?
A short outage rarely does. Search engines retry a page that answers with an error, and they keep the old copy in the meantime.
However, an error that lasts for days is a different matter. Crawlers slow down, and pages can drop out of the index after repeated failures. Therefore fix a lasting error quickly, and check the crawl report in your search console afterwards.
Blocks aimed at one visitor, such as a rate limit or a firewall rule, do not change rankings unless they also catch the crawlers. So make sure that your security rules allow verified search bots.
When to ask for help
Many causes take a few minutes to fix once you know where to look. Others need access to the server, the firewall and the Cloudflare account at the same time, which is hard when different people manage each part.
If the error keeps coming back, the cause is often capacity, a fragile server setup or a rule that is too broad. In that case a review of the whole path, from DNS to the application, saves more time than another quick patch.
The official description of this error is in the Cloudflare documentation, which lists every known cause in technical detail. This site is independent and is not affiliated with Cloudflare.
Does your site keep showing Cloudflare errors?
We build fast, secure websites hosted on Cloudflare. Tell us what you see, and we will quote for finding and fixing the cause.
Talk to us about your siteFrequently Asked Questions
Is error 522 a problem with my computer or internet connection?
Usually not. The error page is produced by Cloudflare after your request has already reached its network. So your connection works, and the problem lies with the site, its server or its security rules.
Who has to fix error 522?
The owner of the website or their hosting provider. A visitor cannot fix it, but a report with the Ray ID helps the owner find the cause faster.
How long does error 522 last?
It lasts until the cause is removed. Some cases clear in seconds, for example when a server restarts, while a wrong setting stays until someone corrects it.
Will clearing my cache or cookies fix error 522?
Rarely. The error is created on Cloudflare's side for each request, so old browser data is seldom the cause. However, a hard reload is quick and harmless, so it is worth one try.
What is the Ray ID on the error 522 page?
It is a unique identifier that Cloudflare gives to every request. The site owner can search for it in the Cloudflare dashboard to see exactly what happened to your request.
More questions about error 522
Is Cloudflare down when I see this error?
Almost never. The error page itself is served by Cloudflare, which shows that its network is answering. Still, you can check the Cloudflare status page if many unrelated sites fail at once.
Can Cloudflare Support fix it for me?
Only if you own the domain. Cloudflare Support works with the account owner and cannot change another customer's settings. Visitors should contact the website instead.
Does a VPN or proxy cause this error?
It can for errors that block a visitor, because many sites restrict addresses used by VPNs and data centres. For errors between Cloudflare and the origin server, a VPN makes no difference.
Which HTTP status code does it return?
Cloudflare returns this error with HTTP status 522. Monitoring tools and logs often record only that status, so search for it when you look for this error.
Can I show my own page instead of the Cloudflare error page?
Yes, if you own the site. Cloudflare lets the owner replace its default error pages with custom ones on plans that include that feature. The cause of the error stays the same, though.