Find out why Cloudflare has no route to your server
Cloudflare error 523 means Cloudflare couldn't contact your origin server at all, typically because a network device between them has no route to the server's IP address. A 522 is a server that doesn't answer in time; a 523 is a server Cloudflare can't find a path to. Start with the origin IP address in your DNS records, then the routing at your host, then any route table that might send Cloudflare's own address range somewhere private.
Why there's no route to your server
The DNS record holds the wrong IP
An A or AAAA record for the proxied hostname has an address your server no longer uses, such as one from before a move, or a typo in the address.
Routing breaks at the host
A network change or fault at your host, or somewhere on the path to it, leaves a device with no route to your server's address.
A broad route swallows Cloudflare's range
In a cloud network, a route that sends all of 172.0.0.0/8 to a private destination also covers 172.64.0.0/13, one of Cloudflare's public ranges, so traffic meant for Cloudflare goes there instead. Only 172.16.0.0/12 is private address space.
Cloudflare's error 523 guide describes these causes and gives the overly broad route in an AWS VPC route table as a common one. Cloudflare lists 172.64.0.0/13 among its published ranges, and RFC 1918 defines the private 172.16.0.0/12 block.
Check the route from your server to Cloudflare
# On the origin server: show the gateway and interface used to reach an address in Cloudflare's range
ip route get 172.64.0.1
# Trace the path from the origin to the Cloudflare address your access logs showed most before the errors (172.64.0.1 here)
mtr -rwc 20 172.64.0.1
Read the route
ip route getprints the gateway and interface the server would use, from the server's own route table. For a Cloudflare address that should be your normal route to the internet. If it names a VPN, a peering link or another private gateway, a broader route on the server is catching Cloudflare's range. A clean result doesn't clear your cloud network, though: its route tables apply to the whole subnet and never show up on the server, so read them as well. Cloudflare's guide suggests adding a more specific route for 172.64.0.0/13 that points at your internet gateway.In the
mtrreport, the last hop that responds shows roughly where the path ends. A trace that dies inside your host's network suggests a routing fault there, though some routers never answer traces, so let the host confirm it. When the other checks don't solve it, Cloudflare's guide asks your host for this same trace, run from the origin to the Cloudflare address that connected to it most often before the errors began.
How to fix Cloudflare error 523
- Confirm the origin addressGet the server's current public IPv4 and IPv6 addresses from your host and compare them with the A and AAAA records of every proxied hostname. Fix or remove any record that points at an address the server doesn't have.
- Narrow overly broad routesLook through the server's route table and your cloud network's route tables for routes to a private destination wide enough to include Cloudflare's ranges, and narrow them or add a specific route to the internet gateway.
- Hand the trace to your hostIf the addresses and routes look right, send your host the trace from the origin to Cloudflare together with the times of the 523s. A routing fault inside their network is theirs to repair.
Frequently asked questions
What's the difference between error 522 and 523?
With a 522, Cloudflare sent its packets toward your server and waited for a reply that never came in time. With a 523, a device on the way had no route to your server's address, so the packets had nowhere to go. Cloudflare's guides for 522 and 523 cover each.
Can moving my site to a new server cause error 523?
It can. If the new server has a different IP address and the DNS records still hold the old one, Cloudflare tries to reach an address that no longer leads to your site. When no route leads to the old address, you get a 523. When the address still exists but nothing answers, Cloudflare's 522 guide lists the same mismatch as a cause of 522. Either way, checking the A and AAAA records is the first step in Cloudflare's 523 guide.
Check the other ways Cloudflare loses your server
- Website reliabilityHear about it when your site goes down, not days later from a customer.
- Cloudflare error 522Find where Cloudflare's packets go unanswered, then fix the firewall, the address or the load behind it.
- Cloudflare error 521Get the web server running on the port Cloudflare uses, then make sure nothing on the origin blocks Cloudflare's addresses.
- Is my website down?Tell your own connection apart from a real outage, then trace the error to its cause.