# Cloudflare error 522: connection timed out

> Cloudflare error 522 means Cloudflare timed out contacting your origin. Learn the two timeouts behind it, the usual cause and how to fix it.

Canonical: https://scaplet.com/errors/http/522

Guide Error · CDN and hosting

Cloudflare error 522 means Cloudflare timed out contacting your origin. Learn the two timeouts behind it, the usual cause and how to fix it.

4 min

read

6

sources

Oct 22, 2026

updated

Scaplet Editorial Team

author

522 5xx · Server error

The short answer

Cloudflare error 522 means Cloudflare timed out while contacting the origin web server. It is a Cloudflare-defined status, not standard HTTP. The most common cause is an origin firewall that rate limits or blocks Cloudflare's IP addresses. Others are an overloaded or offline server, disabled keepalives and a wrong origin IP in DNS.

1. [What error 522 means and the two timeouts behind it](#what-error-522-means-and-the-two-timeouts-behind-it)
2. [How to get past a 522 as a visitor](#how-to-get-past-a-522-as-a-visitor)
3. [How to fix a 522 as a site owner](#how-to-fix-a-522-as-a-site-owner)
4. [What it does to SEO](#what-it-does-to-seo)

30-second check

## Where does your site stand?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F522%20(%22Cloudflare%20error%20522%3A%20connection%20timed%20out%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F522%20(%22Cloudflare%20error%20522%3A%20connection%20timed%20out%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F522%20(%22Cloudflare%20error%20522%3A%20connection%20timed%20out%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Ferrors%2Fhttp%2F522%20(%22Cloudflare%20error%20522%3A%20connection%20timed%20out%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

_01_The two timeouts that cause a 522

## What error 522 means and the two timeouts behind it

Error 522 is not a standard HTTP status. IANA lists 512 to 599 as unassigned, and Cloudflare defines 522 as "Cloudflare times out contacting the origin web server." Cloudflare describes two different timeouts, depending on when the failure happens:

Stage

### Before the TCP connection exists

What Cloudflare waits for

A SYN+ACK reply after sending a SYN

Limit

19 seconds (SYN retries at 1, 1, 1, 1, 1, 2, 4 and 8 seconds)

Stage

### After the TCP connection exists

What Cloudflare waits for

An acknowledgment (ACK) of its resource request

Limit

90 seconds

Both mean the origin or the network path to it did not reply. Cloudflare's connection limits page adds that these two rows are not an exhaustive list of what can produce a 522, and that a timeout while TLS setup is still pending can be reported as a 522 rather than a [525](/errors/http/525). If Cloudflare connected and the origin acknowledged the request but sent no response in time, you get a [524](/errors/http/524) instead. If the origin actively refused the connection, you get a [521](/errors/http/521).

_02_How it works

## How to get past a 522 as a visitor

Cloudflare says that when most [5xx errors](/errors/http/5xx-errors) appear, the right first step is to contact the hosting provider or site administrator, and that Cloudflare Support only assists the domain owner. As a visitor you can do little beyond waiting and ruling out your own setup.

1. 01

### Reload after a minute

A reload costs nothing and may work if the origin was briefly overloaded. A 522 that persists needs the owner to act.
2. 02

### Try another network or device

If the page loads on mobile data or on someone else's connection, the problem is local. If it fails everywhere, the site has the fault.
3. 03

### Tell the site owner

Send the exact URL, the time with your timezone and the error code. Cloudflare lists those details for owners to give a hosting provider. Add the Ray ID if the error page shows one, since Cloudflare's log tools can filter by it.

_03_Causes of a 522, where to look and the fix

## How to fix a 522 as a site owner

Cloudflare lists these common causes, with the first called the most common. Each one is at the origin or between it and Cloudflare, so you usually need your hosting provider.

Cause

### Cloudflare IP addresses are [rate limited](/glossary/rate-limiting) or blocked

Where to look

`.htaccess`, iptables, host firewalls

Fix

Confirm the host allows all Cloudflare IP ranges (the most common cause, per Cloudflare). To restrict countries, use a Cloudflare WAF custom rule instead

Cause

### Overloaded or offline origin

Where to look

Server load, process status, logs

Fix

Restore capacity; the server drops incoming requests when overloaded

Cause

### Keepalives disabled at the origin

Where to look

Web server configuration

Fix

Enable keepalives; Cloudflare says to ensure HTTP keep-alive connections are enabled on your origin

Cause

### Origin IP in Cloudflare DNS is out of date

Where to look

The A or AAAA record against what your host has provisioned

Fix

Update the record to the current origin IP

Cause

### Packets dropped at the origin

Where to look

Network path, MTR or traceroute

Fix

Work with the host on routing and packet loss

Some Cloudflare products add their own ways to get a 522. With Cloudflare Pages, check that a custom domain is set up and the CNAME points to your Pages domain. A Worker with a Custom Domain that fetches its own hostname causes a 522; Cloudflare suggests a Route targeting another hostname, or the `global_fetch_strictly_public` compatibility flag. With Origin Rules, the resulting hostname must resolve: an [A record](/glossary/a-record) pointing to a reserved address such as `100::` or `192.0.2.0` returns a 522.

Check the path to your origin

```
# From the origin: find recent Cloudflare connections in your access log, # then trace the route back to one of those addresses mtr -rwc 50 CLOUDFLARE_IP_FROM_YOUR_LOGS
```

**What to collect before opening a Cloudflare ticket**Cloudflare asks for an MTR or traceroute from your origin to a Cloudflare IP that commonly connected before the issue, a connecting Cloudflare IP identified from your origin logs, and the hosting provider's findings. Origin Analytics can show a high TCP failure rate for specific paths, which suggests a path-specific problem rather than a general origin outage.

_04_Explained

## What it does to SEO

Google treats 5xx responses as server errors: its crawlers slow down, content returned with them is ignored, and URLs already indexed are kept for a while but eventually dropped if the errors persist. A 522 is a 5xx from the crawler's side, so a repeated one slows crawling. See [5xx server errors](/seo-issues/server-errors-5xx) for how to trace the pattern and confirm recovery, and Google's documentation on how [HTTP status codes](/glossary/http-status-codes) affect its crawlers.

Questions

## Asked a lot.

4 questions people ask next, answered from the sources on this page.

_01_ How can I fix a connection timed out error on Cloudflare?

First confirm your host allows all Cloudflare IP ranges, the most common cause per Cloudflare. Then check the origin is online and not overloaded, keepalives are enabled, and the origin IP in Cloudflare DNS is correct.

_02_ Why does Cloudflare time out?

Cloudflare gives up when it gets no SYN+ACK within 19 seconds of its SYN, or no acknowledgment of its resource request within 90 seconds after connecting. Both point to an unresponsive origin or network path.

_03_ Is a 522 the same as a 504?

No. A [504 Gateway Timeout](/errors/http/504) is a standard HTTP status where a proxy got no response in time. A 522 is a Cloudflare-specific status for a timeout while contacting the origin, with defined TCP-stage limits.

_04_ Can a visitor fix error 522?

No. Cloudflare says Cloudflare Support only assists the domain owner, and that a site visitor should report the problem to the site owner.

Sources · 6

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- cloudflare.com
- iana.org
- google.com

1. 01 [Error 522 - Cloudflare Support docs](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/error-522/) developers.cloudflare.com · checked 2026-10-25
2. 02 [Cloudflare 5xx errors - Cloudflare Support docs](https://developers.cloudflare.com/support/troubleshooting/http-status-codes/cloudflare-5xx-errors/) developers.cloudflare.com · checked 2026-10-25
3. 03 [Cloudflare IP addresses - Cloudflare Fundamentals docs](https://developers.cloudflare.com/fundamentals/concepts/cloudflare-ip-addresses/) developers.cloudflare.com · checked 2026-10-25
4. 04 [IANA: Hypertext Transfer Protocol (HTTP) Status Code Registry](https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml) iana.org · checked 2026-10-25
5. 05 [How HTTP status codes affect Google's crawlers](https://developers.google.com/crawling/docs/troubleshooting/http-status-codes) developers.google.com · checked 2026-10-25
6. 06 [Connection limits - Cloudflare Fundamentals docs](https://developers.cloudflare.com/fundamentals/reference/connection-limits/) developers.cloudflare.com · checked 2026-10-25

## Keep learning

[All errors](/errors)

[Learn Cloudflare error 521: web server is down CDN and hosting errors](/errors/http/521) [Related 5xx server errors Status codes and links](/seo-issues/server-errors-5xx) [Read next Cloudflare error 523: origin is unreachable CDN and hosting errors](/errors/http/523) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in errors
[511 Network Authentication Required](/errors/http/511)

More in CDN and hosting errors
[Cloudflare error 521: web server is down](/errors/http/521) [Cloudflare error 522: connection timed out](/errors/http/522) [Cloudflare error 523: origin is unreachable](/errors/http/523) [Cloudflare error 524: a timeout occurred](/errors/http/524) [Cloudflare error 525: SSL handshake failed](/errors/http/525) [Cloudflare error 526: invalid SSL certificate](/errors/http/526) [Cloudflare error 530](/errors/http/530)

Terms on this page
[Rate limiting](/glossary/rate-limiting) [A record (DNS address record)](/glossary/a-record) [HTTP status codes](/glossary/http-status-codes)

Free · 2 minutes

## Tools point. Agencies advise. _This one ships._

Run the free audit, then approve the fixes. Every change can be undone.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **0→7** ChatGPT citations in six weeks Paylane
