Skip to content
RU

Cloudflare Error 523: Origin Is Unreachable. Finding the Broken Route

What it means: Cloudflare could not reach your origin's IP address at all, because no network route to it worked.

  1. Confirm the origin IP in Cloudflare DNS
  2. Check the server's IP did not change
  3. On AWS, check routes for 172.64.0.0/13
  4. Send the host an MTR to Cloudflare

Test your URL now

Requests the address and shows the status code and what the server sends back.

What error 523 means

Cloudflare documents 523 as: "This error occurs when Cloudflare cannot contact your origin web server", and the common cause as "a network device between Cloudflare and the origin web server does not have a route to the origin's IP address" (Cloudflare: Error 523). The page reads "Origin is unreachable" and carries the 523 status.

It sits one step earlier than its neighbours. With 521 the origin host answered and refused; with 522 packets went out but nothing came back in time. With 523 the path itself is broken: the address Cloudflare has for your origin is not reachable from its network. That makes the origin IP in DNS and the routing around your server the first things to check, not the web server.

Common causes

CauseHow to recognise itFix
Wrong or stale origin IPThe proxied A or AAAA record holds an address your server no longer has: a migration, a new VPS, a dynamic home IPUpdate the record in the Cloudflare DNS tab
Private or internal address in a proxied recordThe record points to a 10.x, 192.168.x or similar address that only exists inside your networkUse the server's public address, or connect a private origin with Cloudflare Tunnel instead
Broad route capturing Cloudflare's ranges (AWS)A VPC route such as 172.0.0.0/8 sends replies to Cloudflare's 172.64.0.0/13 into a private destinationNarrow the route, or add a more specific route for 172.64.0.0/13 to the Internet Gateway
Routing problem at the host or upstream ISPTraceroute from the origin to a Cloudflare IP dies inside the provider's networkOpen a ticket with the host with an MTR attached
Origin network downThe server is unreachable from everywhere, not only from CloudflareRestore the network; check the provider's status page

The AWS case comes straight from Cloudflare's own resolution notes: Cloudflare uses public addresses in 172.64.0.0/13, which an overly broad route for 172.0.0.0/8 captures by mistake (Error 523 resolution).

How to fix it

  1. Read the origin address Cloudflare uses. Proxied records resolve to Cloudflare, so dig will not show it; open the DNS tab, or list records with the API:
    curl -s -H "Authorization: Bearer $CF_API_TOKEN" \
      "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/dns_records?name=example.com" | grep -o '"content":"[^"]*"'
  2. Compare with the server's real address. On the origin: ip -4 addr show scope global and curl -s https://ifconfig.me (the public address, which differs behind NAT).
  3. Test reachability of that address from outside your network:
    curl -sv --resolve example.com:443:203.0.113.10 https://example.com/ -o /dev/null
    # * connect to 203.0.113.10 port 443 failed: No route to host
    "No route to host" or a timeout from several networks confirms a routing problem.
  4. Trace from the origin toward Cloudflare, as Cloudflare asks: pick a Cloudflare IP that connected recently (from your access logs) and run mtr -rwc 50 104.16.0.1, using an address from your own logs rather than this example.
  5. On AWS, inspect the VPC route table for routes broader than intended and add a specific route for 172.64.0.0/13 to the Internet Gateway if needed.
  6. For servers without a public IP, publish them with Cloudflare Tunnel rather than pointing a proxied record at a private address.

If the origin moved recently

Most 523 incidents follow a change: a move to a new VPS, a new load balancer, a re-created cloud instance with a fresh public IP, or a home server whose provider assigned a new address overnight. In each case the site worked until the address changed, and the proxied record kept pointing at the old one. Two habits prevent the repeat. First, after any migration, compare the address in every proxied A and AAAA record with the new server, including records for subdomains such as api or www that are easy to forget. Second, for servers on dynamic addresses, do not rely on manual DNS edits at all: either update the record automatically through the Cloudflare API when the address changes, or run Cloudflare Tunnel, which needs no inbound address. Keep the old server reachable for a while after a move, so a missed record shows up as old content rather than as an outage.

How to confirm the fix

curl -s -o /dev/null -w '%{http_code}\n' --resolve example.com:443:203.0.113.10 https://example.com/
# 200
curl -s -o /dev/null -w '%{http_code}\n' https://example.com/
# 200

Both requests, direct to the origin and through Cloudflare, must succeed, and the 523 count in Error Analytics must stop growing. The HTTP status checker shows what the proxied URL returns from outside your network; the traceroute tool helps when you need a path from a network other than your own.

Related errors

60+ Status CodesComplete HTTP status code reference
Search by CodeQuick search for 200, 301, 404, 500
Categories 1xx–5xxInformational, success, redirects, errors
Examples & CausesWhen it occurs and how to fix it

Why teams trust us

60+
status codes
1xx-5xx
all categories
SEO
ranking impact
Free
online reference

How to use the reference

1

Enter code or keyword

2

Find description and causes

3

Apply recommendations

HTTP Status Codes Reference

HTTP status codes are three-digit numbers that the server returns for every request. They tell the browser and search crawlers what happened: success, redirect, or error.

Quick Search

Enter a code or keyword — instant result with description.

All Categories

1xx Informational, 2xx Success, 3xx Redirect, 4xx Client Error, 5xx Server Error.

Causes & Fixes

For each code: typical causes and concrete steps to resolve.

SEO Impact

How each code affects indexing and link juice transfer in Google.

Who uses this

Developers

choosing correct status

SEO

redirect optimization

DevOps

5xx error diagnostics

Marketers

landing page check

Common Mistakes

Confusing 301 and 302301 is permanent (passes SEO equity), 302 is temporary (does not).
Returning 200 on error"Soft 404s" — a 404 page with status 200 — confuse search engines and stay indexed.
Ignoring 5xx errors500, 503 are server failures. Prolonged episodes remove pages from the index.
Redirect chainsA→B→C instead of A→C slows loading and dilutes SEO equity. Simplify chains.

Best Practices

Use 301 for permanent redirectsThis passes 90–99% of link equity to the new URL.
Return 404 for missing pagesDon't mask 404 as 200 — it hurts SEO and UX.
Monitor 5xx in real timeSet up an HTTP monitor that alerts on 5xx.
Use 410 instead of 404410 Gone means "page permanently removed" — Google de-indexes faster.

Monitor HTTP statuses automatically

HTTP monitor alerts when response code changes or 5xx appears.

Sign up free

Learn more

Sources

Frequently Asked Questions

What is the difference between Cloudflare 522 and 523?

522 means Cloudflare sent the connection attempt and got no reply in time. 523 means there was no usable route to the origin's IP address at all.

Can a wrong DNS record cause error 523?

Yes. If the proxied A or AAAA record holds an old, private or mistyped address, Cloudflare tries to reach an IP that is not reachable and returns 523.

Why does 523 happen on AWS?

A common cause is a VPC route such as 172.0.0.0/8 that also covers Cloudflare's public range 172.64.0.0/13, so replies never reach Cloudflare. Add a more specific route to the Internet Gateway.

How do I connect a server that has no public IP?

Use Cloudflare Tunnel, which makes an outbound connection from the server to Cloudflare, instead of a proxied DNS record pointing at a private address.

What should I send to my hosting provider?

The error code, the time with time zone, the failing URL and an MTR or traceroute from the origin to a Cloudflare IP that used to connect to it.

Try the live tool that powered this guide

Free plan — 10 monitors, checks every 5 min, no card required. Upgrade for 1-minute interval and multi-region monitoring.