Question

My domain is not working.

My domain is not working. It is throwing 521 error. It was working earlier. Please tell me what’s the problem.And how can I fix it.


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

alexdo
Site Moderator
Site Moderator badge
April 7, 2023

Hello @suryapratapsoni

I would assume you’re using some CDN service like CloudFlare. The 521 can occur when there is an issue with your web server, but this can be sometimes caused by the CDN provider as well.

Also if you’ve recently enabled the CDN and you’re using custom firewall rules, make sure to whitelist all the IP ranges of the CDN provider.

You can temporarily disable the CDN to test if the issue is within your server. You can check this article from. their community:

https://community.cloudflare.com/t/how-do-i-temporarily-disable-cloudflare/68798/2

Regards

KFSys
Site Moderator
Site Moderator badge
April 6, 2023

Hey @suryapratapsoni,

Are you using CloudFlare or another CDN? 521 error is a server error that occurs when the web server is down or unreachable. This error is typically caused by a connectivity issue between the web server and the Cloudflare CDN.

There are a few possible reasons why you may be seeing a 521 error:

  1. The server is down or unreachable: If the web server is down or unreachable. Here you’ll need to SSH to your Droplet and check if everything is alright with services, usually Apache2/Nginx are the one causing this issue

  2. Firewall or security settings: If the Droplet and Services is up and running, but the firewall or security settings are blocking requests from the Cloudflare CDN, you may see a 521 error. You can check your firewall or security settings to ensure that they are not blocking requests from Cloudflare.

  3. Network connectivity issues: Network connectivity issues can also cause a 521 error. You can ping your Droplet and see if it’s working, if you can’t ping you can try to reboot it from the Control Panel and then Try to use the Recovery Console to enter it https://docs.digitalocean.com/products/droplets/how-to/recovery/recovery-console/

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel