Question

Website sometimes returns DNS erro

Greetings,

I have been using Digital Ocean for over a year now. Lately (last 6 months~) I have noticed sometimes my sub-domains will return DNS errors. It seems to be random when it happens, and it is hurting the users of my site.

The only way I have been able to fix them is to edit the hosts file on my own computer, which is not productive.

My hosts file (on my DO droplet) is setup like this:

# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.redhat.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
#     /etc/cloud/cloud.cfg or cloud-config from user-data
# The following lines are desirable for IPv4 capable hosts
127.0.0.1 my-site.2006 my-site.2006
127.0.0.1 localhost.localdomain localhost
127.0.0.1 localhost4.localdomain4 localhost4
123.456.789.000 my-site.net sited
123.456.789.000 cp.my-site.net cpd
123.456.789.000 forum.my-site.net forumd
123.456.789.000 wiki.my-site.net wikid

# The following lines are desirable for IPv6 capable hosts
::1 my-site.2006 my-site.2006
::1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

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.

Accepted Answer

Hi @blackoutro2006

There has been small delays/fallouts with the DigitalOcean name servers in some regions. It has been fixed now. That could be part of your problem.

But another problem is that you have set the TTL (Time To Live) to 0, which can lead to problems with some clients (your visitors computers), which might think the DNS is failing and it will never cache the DNS, so it needs to request a DNS every time. This can also lead to people getting blocked by the name servers, since it’s causing overload on the name servers.

What is the domain?

Try DigitalOcean for free

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

Sign up

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.