If you are browsing a website and suddenly see a ‘web server is down error code 521’ flashing on your screen, then don’t worry as this error can be resolved quite easily.
This error message can occur due to several factors and in this article, we will discuss the causes of this error as well as four ways to fix it.
Causes of Cloudflare web server is down error code 521
Here are the possible causes of the Cloudflare ‘web server is down error code 521’ :
Network connection issue
The web server might be experiencing some issues with the network. Either there is an outage or the server is offline due to maintenance or server overload.
Cloudflare requests are being blocked
It might happen that the firewall or other security software like Windows Defender is interfering with the Cloudflare requests due as they identified the requests as a potential threat.
There are configuration issues with the server
Make sure that the server is optimally configured when setting up a Content Delivery Network (CDN).
The server has no valid SSL certificate
A Secure Socket Layer (SSL) protects the data exchanged between the user and the website. If you haven’t installed a Cloudflare Origin Certificate, you will notice the ‘web server is down error code 521’.
Also read: How to fix Cloudflare error 1016?
4 ways to fix Cloudflare web server is down error code 521

Now that we have understood the potential causes of the error, it is time for us to fix it asap. In this section, we have compiled a list of 5 fixes that you should definitely try to fix Cloudflare ‘web server is down error code 521’.
Check for any outage in the origin web server
The first thing that you should do is check the origin web server for any outages. If the origin web server is not working properly or is offline, then Cloudflare won’t connect with it.
Check the server’s logs and find out why the server isn’t running optimally or contact your hosting provider for further support. If you are familiar with Terminal, use the Ping command for Linux and Traceroute for Windows.
One reason for the server outage can be that the server has reached the limits of memory and CPU usage. You can check the order usage of your server. Upgrade your hosting plan to quickly fix the issue.
Oftentimes, when the server is overwhelmed, you will see the ‘web server is down error code 521’ prompt. There is nothing you can do except wait it out.
Several plugins on WordPress can also cause the error. Therefore, you should remove the unnecessary plugins so that the load lessens and Cloudflare requests are responded to quickly.
Test your origin web server
Ensure that your hosting provider hasn’t rate limited Cloudflare’s requests. Since Cloudflare is a reverse proxy, meaning all connections will come from Cloudflare’s IP addresses rather than your actual visitor’s IP addresses.
Run a client Uniform Resource Locator (cURL) command to test the URL’s connectivity and server. Furthermore, whitelist all Cloudflare IP ranges in your server’s firewall. Here is a list of the Cloudflare IP ranges.
While you are at it, ask your hosting provider to whitelist all Cloudflare’s IP addresses from the list.
Install a Cloudflare Origin Certificate
You should install a Cloudflare Origin Certificate or one issued by a trusted certificate authority. You can also get free SSL certificates for your server.
Ensure that Cloudflare connects to port 443
It might happen that your original server may not be configured properly to allow Cloudflare to connect to a proper port. By default, Cloudflare proxies traffic to several HTTP/HTTPS ports. However, if set to a Full or Full (Strict) SSL/TLS mode, then it proxies the traffic routed to port 443.
Therefore, you will have to enable port 443 at your origin web server. If you can’t do it manually, ask your hosting provider to do it for you.
Also read: What does ‘Unknown accessory detected near you’ mean?