Cloudflare Error 521 Web server is down : How to fix it ?

Website returning Error 521

Cloudflare will return error 521 when the website refuses to connect with Cloudflare. Commonly the error caused by firewall or security software. 

The error will be shown as below

Let’s find out what caused the error that might include

  1. Web server is down - Cloudflare tried to connect to the site’s server (origin of website hosted) but failed due to the origin web server being offline.

  2. Firewall or other security software could be interfering with Cloudflare requests - Cloudflare works via a reverse proxy. That means that instead of having all your visitors’ IP addresses go straight to your origin web server, it will seem they are from Cloudflare IPs. A poorly built server security solution will flag this disproportionate traffic and IP addresses as an attack.

  3. Poor encryption settings - Cloudflare has its own Secure Sockets Layer (SSL) certificate and encryption modes. Thus, the origin server might be blocking requests due to the encryption settings.

Here are the tips on how to fix this issue

  1. Check on the origin server - Be sure to see that your web server is running properly independent of Cloudflare. The easiest way to do this is to contact your hosting provider and ask them if their servers are online.

  2. Test a connection to the server - test the connection to the server to safelist Cloudflare IP ranges. It will override the server-side security solutions from blocking Cloudflare’s requests. Check the IP filtering on your host provider to include Cloudflare IP ranges.

  3. Ensure encryption settings - Cloudflare encryption modes help connect the CDN with your web origin server. The connection refused error can occur if you are not using the right encryption mode. For this method, access your Cloudflare dashboard and select the SSL/TLS button to fix the error 521.

  4. Check for website issue - Temporarily disable Cloudflare remove the connection refused error message. Check your website for any other issues before using the CDN again.


If your website is showing the “Error 521: Web server is down” message, it means that your origin server does not respond to Cloudflare’s requests. The error 521 often happens due to a server’s firewall or other security software that blocks Cloudflare IPs. Keep in mind to ensure the web server is working fine as expected.


Comments (0)