https://support.cloudflare.com/hc/en-us/articles/200171916-Error-521-Web-server-is-down
Common causes
The two most common causes leading to Error 521 are:
The web server is offline
The origin web server process (e.g., Apache or Nginx) might not be running or has crashed. In that case:
- Ensure your web server is running normally.
- Review the server’s error logs to see what is causing the error.
If you’re unable to perform these tasks, contact your host provider.
Cloudflare requests are blocked
The origin web server or hosting provider’s network might be blocking Cloudflare’s requests.
As a reverse proxy, Cloudflare connects to your server from a Cloudflare IP and all subsequent traffic comes exclusively from a smaller set of Cloudflare IPs. As a result, certain server-side security solutions might mistake the increase in legitimate connections from this smaller set of IPs as an attack. This results in some Cloudflare IPs being blocked or rate-limited.
To resolve this issue, allowlist all Cloudflare IP ranges in your server’s firewall or any other security software at the origin. See the list of Cloudflare IP ranges.
If you’re unable to allowlist Cloudflare IPs, contact your host provider.