Website sometimes returns DNS erro

June 21, 2017 159 views


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 my-site.2006 my-site.2006 localhost.localdomain localhost localhost4.localdomain4 localhost4
123.456.789.000 sited
123.456.789.000 cpd
123.456.789.000 forumd
123.456.789.000 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
3 Answers
hansen June 21, 2017
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?

Have another answer? Share your knowledge.