Cloudflare cannot reach your origin server - routing fails.
The Cloudflare 523 "Origin Is Unreachable" error indicates that Cloudflare cannot establish a network route to your origin server. Unlike errors 521 (connection refused) and 522 (timeout), 523 signals a more fundamental connectivity problem: your server is simply not findable on the network.
This error can have several origins: misconfigured DNS in Cloudflare, an incorrect origin IP, a datacenter outage hosting your server, or BGP routing problems affecting the connection between Cloudflare and your infrastructure. Diagnosis requires checking each link in the chain.
In this detailed guide, we explore the technical causes of 523, diagnostic tools to identify the exact source of the problem, and solutions adapted to each scenario. External monitoring like MoniTao can detect these problems immediately, whether the cause is on Cloudflare's side, network, or server.
Error 523 occurs when Cloudflare cannot route packets to your server. Here are the most common causes:
Diagnosing 523 requires checking the complete connectivity chain:
Solutions depend on the identified cause:
This bash script tests connectivity to your origin server from different points:
#!/bin/bash
# Cloudflare 523 Diagnostic - Network connectivity
ORIGIN_IP="your.server.ip"
echo "=== Cloudflare DNS check ==="
dig +short @1.1.1.1 your-domain.com A
echo -e "\n=== Ping test to origin ==="
ping -c 4 $ORIGIN_IP
echo -e "\n=== Traceroute to origin ==="
traceroute -m 15 $ORIGIN_IP
echo -e "\n=== Port 80/443 test ==="
nc -zv $ORIGIN_IP 80 2>&1
nc -zv $ORIGIN_IP 443 2>&1
echo -e "\n=== Direct HTTP test ==="
curl -sI --connect-timeout 10 http://$ORIGIN_IP | head -3
This script tests DNS resolution, network connectivity via ping and traceroute, and web port accessibility. Run it from an external machine (not your server) to simulate what Cloudflare sees.
Implement these measures to avoid 523 errors:
Log into the Cloudflare dashboard, go to DNS, and check your domain's A record. Compare this IP with your actual server IP shown in your hosting panel.
Rarely. BGP peering issues between Cloudflare and certain networks can cause intermittent 523s from specific datacenters. Check cloudflarestatus.com and the error's Ray ID.
Modify your local hosts file to point your domain to the origin IP: "1.2.3.4 mydomain.com". This bypasses Cloudflare for your tests only.
Ping works (ICMP) but web ports may be closed or filtered. Specifically test ports 80 and 443 with telnet or nc: "nc -zv IP 443".
DNS changes in Cloudflare are generally instant because Cloudflare manages its own authoritative DNS servers. If you just changed the IP, the 523 should disappear within seconds.
521 indicates the server actively refuses the connection. 522 indicates a timeout after connection established. 523 indicates the IP is completely unreachable - no network route. It's the most "severe" of the three.
Cloudflare error 523 signals a fundamental connectivity problem between Cloudflare and your server. Unlike errors 521 and 522 which indicate the server is reachable but refuses or times out, 523 means your server is simply not findable on the network.
Diagnosis involves checking Cloudflare DNS configuration, server status, and network connectivity. External monitoring with MoniTao immediately detects these problems, allowing you to respond quickly whether the cause is a wrong IP, server outage, or routing issue.
Start free, no credit card required.