How to Fix Cloudflare Error 522 (Connection Timed Out)

Cloudflare Error 522 means Cloudflare tried to open a connection to your origin server but it never answered in time. It affects every visitor to your site, and it almost always points to the server or its firewall rather than to Cloudflare. It is fixable once you confirm the server is up and reachable. If your DNS record points at the wrong place, our guide to pointing a domain to your site or IP will help.

What the error means

When a visitor loads your site, Cloudflare opens a TCP connection to your origin server to fetch the page. Error 522 appears when that connection cannot be made within Cloudflare’s time limit. Either the server does not respond at all, or it responds too slowly. The handshake never completes, so Cloudflare gives up and shows the 522 page. In plain terms, Cloudflare knocked and nobody opened the door in time.

Common causes

  • The origin server is down or overloaded, with high CPU or RAM use.
  • A server firewall is blocking Cloudflare’s IP addresses.
  • The DNS A record points to an old or wrong IP.
  • Ports 80 or 443 are not open on the origin.
  • The server is too slow to respond under load.
  • Keep-alive is disabled at the origin.

How to fix it

Work from the outside in: first confirm the server is alive, then check that Cloudflare is allowed to reach it on the right IP and ports.

  1. Confirm the server is up and reachable. If it is down, bring it back first.
  2. Check that the DNS A record points to your current hosting IP, not an old one.
  3. Allow all of Cloudflare’s published IP ranges in the server firewall, such as CSF or the cPanel firewall.
  4. Make sure ports 80 and 443 are open and listening.
  5. Check server load and resource usage, and reduce whatever is pinning CPU or memory.
  6. Enable keep-alive so Cloudflare can reuse connections.

On JetHost hosting

On JetHost, start by confirming your DNS A record matches your hosting IP, which you can find in cPanel. Next, whitelist Cloudflare’s IP ranges so the firewall does not block them. Then open Resource Usage in cPanel to see if a load spike made the server too slow to answer. Our LiteSpeed stack handles traffic well, but a runaway script can still stall responses. If you cannot spot the cause, open a ticket and support will check reachability from the server side.

JetHost Experts Tip

Most 522 errors we see come down to a blocked firewall or a stale A record. Check those two first before anything else.

Frequently asked questions

What does Cloudflare Error 522 mean?

It means Cloudflare could not open a connection to your origin server within its time limit. The server is down, too slow, or blocking Cloudflare.

Why does a firewall cause a 522 error?

If your server firewall blocks Cloudflare’s IP ranges, the connection never completes and Cloudflare times out. Allow all Cloudflare IPs to fix it.

Could a wrong DNS record cause this?

Yes. If the A record points to an old or wrong IP, Cloudflare tries to reach a server that is not there and times out. Point it to your current hosting IP.

New Hosting Plan with 80% OFF

Upgrade your website’s home without the heavy bill. Get new hosting plan with a huge 80% discount. Get free SSL, email accounts, and a control panel to manage your site. Enjoy fast performance, secure environment, and 24/7 support – all in one affordable package.

Need more help?

If the site still times out, open a ticket through Client Area, then Support Tickets, and we will test the connection from the server.