Skip to content

Troubleshooting guide

Cloudflare error 523: origin is unreachable

A 523 means Cloudflare could not find a network route to your server. The problem is at the network level, before any web server is involved.

4 min read11 sectionsUpdated

On this page

Key points

  • 523 is a routing failure, unlike 521 (refused) and 522 (timed out).
  • A wrong A record is the most common fixable cause.
  • Provider network outages produce it too.
  • Test from outside your own network to confirm.

What 523 means

Cloudflare tried to connect to your origin and received a network-level failure, typically no route to host. The origin address is either incorrect, offline at the network level, or being routed nowhere. A server that is on but not accepting connections would show 521 instead.

Common causes

  • The A or AAAA record in Cloudflare points at an old IP, often after a migration.
  • An IPv6 record exists, but IPv6 does not work on the origin.
  • The hosting provider has a network outage, or your server has been suspended.
  • Firewall or routing changes on the origin's network.

Diagnose it

Compare the origin's real IP with what the Cloudflare DNS dashboard has. Then test reachability to the origin directly, from a machine outside your network.

bash
# What IP does the server actually have?
curl -s -4 https://ifconfig.me; echo
curl -s -6 https://ifconfig.me; echo

# Trace the route to your origin IP
traceroute -n 203.0.113.10

# Can the origin be reached directly, bypassing Cloudflare?
curl -sv --resolve example.com:443:203.0.113.10 https://example.com/ -o /dev/null 2>&1 | tail -5

Fixes

Correct the DNS record in the Cloudflare dashboard. Remove AAAA records if the origin has no working IPv6. If the traceroute dies inside your host's network, open a ticket and include the traceroute and the Ray ID from the error page. Check that your server is not suspended and your cloud instance's public IP did not change after a restart: an elastic or reserved IP avoids that.

Tell it apart from the other 52x errors

The code tells you how far Cloudflare got. A 523 stops at routing, so looking at web server logs is wasted effort: the request never arrived. With a 521, packets reached the machine and were rejected. With a 522, they reached nothing that answered in time. If your origin's firewall blocks some Cloudflare ranges, you can see a mix of these from different data centres, so note the data centre code at the end of the Ray ID when you report it.

Catch it automatically

Monitor both the public URL and the origin directly with uptime checks from several regions. If the public URL fails and the origin passes, the path through Cloudflare is the problem. If both fail, it is your host. Include 52x errors explicitly in alert rules.

Frequently asked questions

What is the difference between 521, 522 and 523?

521 is connection refused, 522 is connection timed out, and 523 means no route to the origin.

Is 523 Cloudflare's fault?

Rarely. It usually means an incorrect DNS record or a network problem at your host.

Why does a restart cause 523?

Some cloud instances receive a new public IP on restart, leaving the DNS record pointing at the old one.

Check it now, free

Watch your own site and services with VitalRix

Uptime checks, APM, logs, real-user monitoring, alerts and status pages in one place. Every product has a free tier and no credit card is needed.