Fix error Error 521: Web server is down
Error 521 or Error 521: Web server is down occurs because the original web server refuses to connect from Cloudflare (Cloudflare is a reverse proxy service provider, is an intermediate proxy server between a server and clients) . More specifically, Cloudflare tried to connect to your original server on port 80 or 443 but received a connection error that was rejected.
Fix error Error 521: Web server is down
- Common causes of error 521
- Web server is offline
- Request from Cloudflare is blocked
- Troubleshoot Error 521: Web server is down
- Experiment with cURL
- Experiment with Telnet
Common causes of error 521
The two most common causes of error 521 are:
Web server is offline
The original web server process (eg Apache or Nginx) may not run or has failed. In that case:
- Make sure your web server is running normally.
- Review the server error log to find the cause of the error.
If you are unable to perform these tasks, contact the host provider.
Request from Cloudflare is blocked
The original web server or hosting provider network may be blocking requests from Cloudflare.
As a reverse proxy, Cloudflare connects to your server from a Cloudflare IP and all subsequent traffic to the exclusive from a smaller group of Cloudflare IPs. As a result, certain server-side security solutions can distort the increase in legitimate connections from this smaller IP group, and treat this as an attack. This results in some IP Cloudflare being blocked or restricted by speed.
To resolve this issue, whitelist all Cloudflare IP strips in the server firewall or any other original security software. List of IP ranges of Cloudflare:
IPv4
- 103.21.244.0/22
- 103.22.200.0/22
- 103.31.4.0/22
- 104.16.0.0/12
- 108.162.192.0/18
- 131.0.72.0/22
- 141,101,64.0/18
- 162.158.0.0/15
- 172.64.0.0/13
- 173.245.48.0/20
- 188,114.96.0/20
- 190.93.240.0/20
- 197.234.240.0/22
- 198.41.128.0/17
IPv6
- 2400: cb00 :: / 32
- 2405: b500 :: / 32
- 2606: 4700 :: / 32
- 2803: f800 :: / 32
- 2c0f: f248 :: / 32
- 2a06: 98c0 :: / 29
If you cannot whitelist the Cloudflare IP, contact your hosting provider.
Troubleshoot Error 521: Web server is down
You can use third-party tools such as cURL or Telnet to check the server's response.
For the following example commands, you need to replace the IP address 1.2.3.4 with the original server's IP address. Alternatively, you can run these tests on port 443.
Experiment with cURL
cURL allows you to simulate an HTTP request, so it is a good tool to check if your original server is working properly. You can run cURL through the Terminal command line tool on Mac OS or Linux.
Run the cURL command for your server IP with A or CNAME record for the domain displayed in the DNS application of the Cloudflare dashboard page.
curl http://1.2.3.4 -v
If successful, you will see an HTTP 200 response along with the site's HTML. The unsuccessful cURL request will look like this:
# curl 1.2.3.4
curl: (7) Failed to connect to 1.2.3.4 port 80: Connection refused
Experiment with Telnet
Windows users can check the connection using Telnet (via Command Prompt).
Run a command similar to the following:
telnet 1.2.3.4 80
Error, such as:
Unable to connect to remote host: Connection refused
means your web server is not running or blocking requests.
The connection error rejected will look like this:
# telnet 1.2.3.4 80 Trying 1.2.3.4. telnet: connect to address 1.2.3.4: Connection refused telnet: Unable to connect to remote host
See more:
- Quick fix "This site can't be reached" error on Chrome browser
- Quick fix error 107 net :: ERR_SSL_PROTOCOL_ERROR: SSL protocol error on Chrome browser
- Steps to fix "Your Preferences can not be read" in Chrome browser
You should read it
- How to fix 'This App Can't Run on Your PC' error on Windows 10
- How to fix 403 Forbidden Error
- Summary of iOS 17 errors and how to fix them
- How to fix 502 bad gateway error
- Troubleshooting Error 1016 - Origin DNS error
- Fixed a bug with 'Error getting player information from the server' error when playing Pokemon GO
- How to fix the 404 Not Found error
- Instructions for fixing 502 Bad Gateway error
May be interested
- How to fix 502 bad gateway errorhow to fix 502 bad gateway error. 502 bad gateway error is an extremely common error when we use the internet, it is an http status code, which is understood as a server (server) receiving a response ' invalid / smart
- How to fix Win32Bridge.Server errorwin32bridge.server.exe error messages often appear suddenly and cause you a lot of trouble. this is a system issue and you need to do some work to fix them.
- How to fix the 404 Not Found errorerror 404 is an http status code that means that the page you are trying to access cannot be found on a website on their server. the error indicates that while the server is reachable, the specific page that shows the error is not.
- Some ways to fix DNS Server Not Responding on Windows 7/8/10the dns server not responding is one of the most common errors in windows 7/8 / 8.1 and windows 10. if you get this error, you cannot connect to the internet to access the network.
- How to fix Firefox error Proxy Server refuses to connectunfortunately, sometimes people have trouble using the firefox browser. one of them is a proxy server error that denies connection. the result of this error is that users cannot access the internet at all.
- How to fix 'RPC server is unavailable' errorif you are a windows user, you must have encountered an rpc server is unavailable error. rpc errors occur when there are problems exchanging between two or more machines through the network, this is a common error in windows. this article will show you how to fix rpc errors.
- How to fix the Win32Bridge.server.exe Incorrect function error in Windows 10some users report that while working with windows 10, a message box still appears on their desktop with the following description line
- Steps to fix 'Server IP Address Could Not Be Found' error on Google Chromea serious error that you may encounter when using chrome is server ip address could not be found. this error does not have a single cause, so there are several things you will have to consider to resolve this issue.
- The difference between web server and app serveryou have probably seen that the terms web server and app server are often used interchangeably as if they are related to the same thing and also facilitate the website to function properly. but in reality, they are not the same.
- What is RPC Server is Unavailable Error? How to fix it effectivelythe 'rpc server is unavailable' error usually appears when a windows computer is unable to communicate with other devices on the same network.