If your server firewall (such as:
iptables
UFW
CSF
Windows Firewall
Hosting provider security rules
is blocking Cloudflare’s IP ranges, your server will refuse Cloudflare’s connection attempts.
To Cloudflare, this looks like the web server is down—even if it’s actually running.
4. Web Server Software Is Not Running
Sometimes the server itself is online, but the web service is not.
For example:
Apache stopped
Network Security
Nginx crashed
LiteSpeed failed to start
In this case:
The server responds to ping
SSH works
But ports 80 or 443 are closed
Cloudflare cannot connect, leading to Error 521.
5. Incorrect Server Configuration
Misconfigured server settings can also cause Error 521, including:
Incorrect port configuration
Binding the web server to localhost only
SSL/TLS misconfigurations
Broken virtual host settings
ADVERTISEMENT