Know How To Fix Error 521 in 4 ways

Know How To Fix Error 521 in 4 ways

userPosted by Mason Lava

Error 521 is an error that is specifically related to Cloudflare that will pop up when the WordPress site’s server will refuse to connect to Cloudflare.

Cloudflare is a CDN that allows you to increase the security and performance of the website so there is a possibility that you might be using it.

You should know that Error 521 is not specifically for Cloudflare and it could also be for the webserver.

It means that when the request was directed to Cloudflare and when Cloudflare sent a request to the server- it was incapable of connecting. You will see the error when the server fails to respond.

If your WP website is blocking Cloudflare’s request, then you will come across this error and it could be either Cloudflare’s or the server’s fault.


What is Error 521 Web Server is Down?

What is Error 521 Web Server is Down

When you see a message Error 521 Web Server is Down, it means the website is experiencing a server-side issue. Cloudflare is probably unable to connect to your WordPress site’s server. Despite making a strong TCP connection to your origin server, you will receive a connection refused error in response. Because of this problem, your site will not be visible to your visitors and hence shows the error 521 instead.

It can be very dreadful when the origin server has straightforwardly denied a request from Cloudflare. There is an urgent need for solving tips to get rid of the WordPress site that refuses a connection with the Cloudflare problem. In this write-up, the proactive fixing methods are discussed clearly and precisely. Continue to read to learn!


What Causes the Error 521 Message?

There are two major feasible reasons for the appearance of the Error 521 Message. Give a brief glimpse of the following listed causes:


1. Server Is Down:

Most probably, the WordPress website’s server is down because of which you confront Error 521 Message. It is however most obvious that Cloudflare won’t be able to connect if your WordPress website’s server is offline. The server down is a big problem as it prevents the website to be opened and accessed.


2. Security Software And Other Firewall Program

The security software installed on your computer might be blocking Cloudflare’s request and hence result in the Error 521 Message. Thus, the IP addresses of Cloudflare accidentally get blocked by any of the firewall or security programs. This can also be the one reason for which you are not getting connected to your site’s server.

Unless you get success in connecting the website’s server to Cloudflare, the website won’t get traffic and rank at the top. Therefore, after understanding what actually Error 521 Web Server Down is and why it arises, let’s fix it now.


Know how to Fix Cloudflare Error 521


There are some methods that you can use to fix Error 521


error 521

1. Check the webserver

If the issue is from the webserver’s end, then you should if it is working or not. If it is not working, then it is obvious that you will see this error. You have a number of websites that are hosted on your server then you can see whether the other websites are working or not.

 Check the status page of the hosting provider. You will get to see all the data in one place. Therefore, if one of the servers fails to work, then you will get to know about it from there.

You will get to know if the webserver is down or it is due to a faulty CDN. You will also get an option to test the webserver in some web hosts from where you can test the webserver.

In the same way, most of the managed hosting or VPS/Dedicated server will offer you an option to check the website. Check the same thing with the terminal, but you should know that this is for advanced users.


2. Switch HTTP to HTTPS

Cloudflare enables the SSL certificate and when you don’t have the certificate, the entire HTTP requests get redirected. Even if you enter HTTPS://, it will be redirected to because of the protocol.

When the SSL is enabled, Cloudflare redirects the websites to HTTPS.

When you enable the SSL, Cloudflare redirects the websites to HTTPS. However, if the definite domain in your WordPress has been set to HTTP then it will be an infinite loop. Cloudflare will try to redirect the URL to HTTPS while the website will try to send the URL to HTTP which will display Cloudflare error 521.

You can fix it by changing the HTTP to HTTPS by going to the WordPress settings. When you navigate to the general settings, you will come across an option to change the URL. You can do it and reload the page. You can also try to reload the website to check if it is working or not.

If it is still not working, then you need to ensure that you don’t have the redirection plugin which is the reason behind this issue. You can deactivate the plugin and then check if Error 521 has been resolved or not.


3. Switch Full SSL to Flexible SSL

When it comes to the SSL certificate, there are a number of options that you can choose from. The first option is the full SSL and the other one is the flexible SSL.

  • If you are using full SSL then you can change it to the flexible SSL with the help of the following steps:
  • Sign in to the dashboard and then click on ‘Crypto’
  • Look at the sidebar where you will see an option to select the ssl
  • Change it from full to flexible
  • Wait till it gets activated and then reload the website


4. .htaccess File

If you have come across some errors in the past then you might have seen that the .htaccess file is involved a couple of times.

You must be aware of the fact that we can’t regenerate the file in order to fix Error 521. You can resolve the error by following the steps mentioned below:

  • Open the file manager from the cPanel
  •  You will come across the .htaccess file but if you don’t see it then you can go to the settings and click on ‘Show hidden files’
  •  Open the file and then click on the ‘Code’ edit tab and edit the file

Ensure that no IP address is blocked. Confirm the IP address from and no IP address from the list should be blocked.



We hope that with the help of the above-mentioned steps, you will be able to get rid of Error 521. You can reach out to WordPress Support if there is anything else that you require help with.

Tagged with: