Error 522: Connection timed out

Cloudflare couldn’t open a connection to the server behind your site in time, so it showed its own error page in place of your app.

Browser page
Connection timed out Error code 522 Visit cloudflare.com for more information. 2026-10-27 18:42:10 UTC

Also appears as

  • error code: 522

Prompt to fix it

My site behind Cloudflare shows "Error 522: Connection timed out". Help me find why Cloudflare can’t reach the origin. Check the repo for how the app is deployed and which host serves it, list the DNS records that host expects, and walk me through comparing them with my Cloudflare DNS records. If this is a Cloudflare Worker, look for fetch calls to its own hostname. Tell me whether to keep Cloudflare’s proxy on for this host. Don’t suggest turning off SSL or opening the firewall to everyone.

Paste into Layerwise or any AI coding tool.

What it means

When a domain runs through Cloudflare’s proxy (the orange cloud), visitors connect to Cloudflare, and Cloudflare connects to your server, called the origin. Error 522 means that second connection timed out: the origin didn’t answer Cloudflare within 19 seconds, or it connected and then never acknowledged the request within 90 seconds.

Cloudflare itself is working, and the page shows which side failed. The usual problem is the address Cloudflare is trying: an old IP in a DNS record, a server that’s down, or a firewall that drops Cloudflare’s traffic.

If the app lives on Vercel or Netlify, you may not need the proxy at all. Those hosts handle HTTPS and caching themselves, and they recommend pointing DNS straight at them with the record set to DNS only (the grey cloud).

Common causes

  • A proxied DNS record still points to an old server IP after the app moved hosts.
  • The origin server is down, overloaded, or its firewall blocks or rate-limits Cloudflare’s IP addresses.
  • A Cloudflare Pages site got a CNAME record for a custom domain that was never added to the Pages project.
  • A Worker on a Custom Domain calls fetch on its own hostname.

How to fix it

  1. In the Cloudflare dashboard, open DNS → Records and check that each proxied A, AAAA, or CNAME record points to the address your host gives you today.
  2. Open the origin directly, such as my-app.vercel.app or the server’s IP, to confirm the app is up.
  3. If you run the server, allow Cloudflare’s IP ranges in its firewall and check its load.
  4. For Cloudflare Pages, add the domain under Custom domains in the Pages project, then point the CNAME at the project’s pages.dev address.
  5. For a site on Vercel or Netlify, consider switching the record to DNS only so visitors connect to the host directly.
All errors
Error 1101 Ray ID: 8d4f1c2b9a7e3f10 • 2026-10-27 18:42:10 UTC Worker threw exception

Error 1101: Worker threw exception

Your Cloudflare Worker hit a JavaScript error while handling the request, so Cloudflare showed its error page in place of a response.

This page isn’t working my-app.com redirected you too many times. Try deleting your cookies. ERR_TOO_MANY_REDIRECTS

ERR_TOO_MANY_REDIRECTS

The site keeps redirecting the browser in a circle, usually between HTTP and HTTPS or between two domains, so the browser stops trying.

This site can’t be reached Check if there is a typo in my-app.com. If spelling is correct, try running Network Diagnostics. DNS_PROBE_FINISHED_NXDOMAIN

DNS_PROBE_FINISHED_NXDOMAIN

The browser asked DNS where your domain lives and was told the name doesn’t exist, usually because a record is missing or still spreading.

Your connection is not private Attackers might be trying to steal your information from my-app.com (for example, passwords, messages, or credit cards). Learn more about this warning NET::ERR_CERT_COMMON_NAME_INVALID

NET::ERR_CERT_COMMON_NAME_INVALID

The site’s security certificate was issued for a different domain name, so the browser can’t confirm it’s really your site.

Build with an agent that checks its work

The Layerwise agent clicks through the live preview and reads the console, so it catches errors before you do.