Ubuntu server: www not found

Posted December 31, 2014 4.7k views

I configured my server bind with: IN MX 10 IN A IN A
ns1 IN A
ns2 IN A
www IN A
mail IN A

It worked for, but not with, and when I dig I got answer = 0 . What should I do to resolve this?

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.

Submit an Answer
2 answers


As a general rule, A entries are for IP’s while CNAME entries are for hostnames. The bulk of your issues stem from redundancy, as shown below.       IN  A    IN  A
www                 IN  A
www                 IN  CNAME

Those entries need to be consolidated down to:

www                 IN  CNAME       IN  A

You can even go a step further and create a WildCard entry using * to catch traffic to any sub-domains that do not exist. Essentially, if someone visits and that sub-domain does not exist, traffic will hit

You can do this by adding one more line to the fixed version above, so it’d look like so:

www                 IN  CNAME
*                   IN  A       IN  A


Are you pointing your domain directly to DigitalOcean’s DNS or are you managing this through a domain registrar / web hosting provider? I’ve noticed that changes made here at DO are super-quick, while there’s a larger wait time for changes to fully propagate when I manage the DNS directly through, say, GoDaddy, NameCheap, etc. Usually it’s by a large enough margin to notice and DO seems to even keep up with Amazon when it comes to resolution and re-resolution.

Also, can you provide us with the domain? I could at least test it from my end (as a non-cached user) to see if I see any issues. Without it, I’m purely guessing until the general wait-time for resolution passes :)

  • Thanks alot @jtittle

    Thats my domain
    and my hosting is hostgator

  • @anb1990

    When doing a look-up on your DNS records, I’m not showing a www CNAME to be present (using the domain name, so if you removed it, you’ll need to add it back, only the CNAME.

    So adding:

    www     IN  CNAME

    Should get you taken care of.

  • @anb1990

    Also, to note, if you’re making these changes here at DigitalOcean using their control panel, none of those changes will take effect until your domains DNS (nameserver records) are pointing to:

    Wasn’t sure if you were making the changes here expecting them to work and saw that they weren’t :). I mention this as when doing a lookup on your domain, you’re not using DO’s DNS.