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
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.
# 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 -5Fixes
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.
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
- Is Cloudflare down? Live status: checked every few minutes, with outage history.
- Website down checker: Is it down for everyone or just me? Check any site now.
Related reading
- Cloudflare error 1016 "Origin DNS error": how to fix it: Fix Cloudflare error 1016 Origin DNS error: CNAME records pointing to names that do not resolve, deleted origins and load balancer pools, with checks.
- Cloudflare error 1020: Access denied: Fix Cloudflare error 1020 Access denied: find the firewall rule that blocked a visitor using the Ray ID, tune WAF rules and allow your monitors and APIs.
- Cloudflare error 524: a timeout occurred: Fix Cloudflare error 524: the origin accepted the connection but sent no HTTP response within 100 seconds. Find the slow request and move long work off it.
- Cloudflare error 530: how to fix it: Fix Cloudflare error 530, usually shown with error 1033 (Argo Tunnel error) or 1016: stopped cloudflared tunnels, deleted tunnels and origin DNS problems.
- Cloudflare error 1015 "You are being rate limited": how to fix it: Fix Cloudflare error 1015 "You are being rate limited": what triggers rate limiting rules, how long blocks last, and how site owners tune them.
- Cloudflare error 520: web server returns an unknown error: Fix Cloudflare error 520 "Web server returns an unknown error": empty or reset origin responses, crashes, oversized headers and keep-alive mismatches.
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.