What Error 523 Means
With a proxied site, the edge looks up your origin's address in the DNS record and sends packets to it. Error 523 means the edge could not contact your origin at all, typically because no network route leads to that address. It is a routing problem, one step before the others. With error 521 the server answered with a refusal, and with error 522 the connection attempt timed out.
If You See It on Someone Else's Site
- Wait and reload: a network problem on the site's side can clear on its own.
- Your connection is fine: the error page itself was served by the CDN.
- Tell the site owner the time and the Ray ID if it lasts.
Check the Address in DNS
Open the DNS settings in the Cloudflare dashboard and note the A and AAAA records for the failing name. Then compare them with the server:
ip -4 addr show
ip -6 addr show scope global
Also compare with the addresses shown in your provider's control panel. One wrong digit in an A record is enough to cause a 523.
After a Migration or an IP Change
Moving a site to a new server, or getting a new address for an existing one, is the usual moment a 523 starts. The old address no longer leads anywhere, and records that were never updated still point there. Check every proxied name, not only the main domain: www, api, and other subdomains often have their own A records. Update each one to the new address.
A Wrong AAAA Record
Cloudflare's 523 page asks you to confirm that both the A and the AAAA records hold the right origin address. An AAAA record left over from an old server, or one for a server where IPv6 is not configured, can make the site unreachable when the edge uses it, even if the A record is correct. Test the IPv6 path directly from a machine with IPv6:
curl -6 -I --resolve 'example.com:443:[2001:db8::10]' https://example.com/
Replace 2001:db8::10 with the address in the AAAA record. If it fails while the IPv4 test works, correct the record or delete it until IPv6 works on the server.
Is the Server Online?
If the addresses are right, check the server itself. Open the console in your provider's control panel; if the server is stopped or hangs at boot, start it there. Once logged in, check that the network is up and has a default route:
ip -br addr
ip route
ping -c 3 GATEWAY_IP
Use the gateway address from the default via line. A missing default route or an interface that is down is often the result of a network configuration edit; on Ubuntu, sudo netplan try applies a change and rolls it back unless you confirm it within 120 seconds.
Trace the Route from Outside
From another machine, follow the path to the server:
mtr -rw -c 50 203.0.113.10
-r prints a report, -w keeps host names in full, and -c 50 runs 50 cycles, one per second. Loss that starts at one hop and continues to the end shows where traffic stops; loss at a single hop in the middle that does not carry on is usually harmless. A looking glass lets you run the same test from other networks. If the trace ends inside your provider's network, send them the report.
Confirm the Fix
curl -I --resolve example.com:443:203.0.113.10 https://example.com/
curl -I https://example.com/
The first command tests the origin directly and the second goes through the CDN; expect 200 and a cf-ray header on the second. If the origin is now reachable but refuses or times out, see error 521 or error 522.