I configured my server bind db.mydomain.com with:
mydomain.com. IN MX 10 mail.vumila.com. mydomain.com. IN A 192.192.192.82 www.mydomain.com IN A 192.192.192.82 ns1 IN A 192.192.192.82 ns2 IN A 192.192.192.81 www IN A mydomain.com. www IN CNAME mydomain.com. mail IN A 216.172.176.82 ftp IN CNAME mydomain.com.
It worked for mydomain.com, but not with www.mydomain.com, and when I dig www.mydomain.com I got answer = 0 . What should I do to resolve this?
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!
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.
mydomain.com. IN A 192.192.192.82
www.mydomain.com IN A 192.192.192.82
www IN A mydomain.com.
www IN CNAME mydomain.com.
Those entries need to be consolidated down to:
www IN CNAME mydomain.com.
mydomain.com. IN A 192.192.192.82
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 sub.mydomain.com and that sub-domain does not exist, traffic will hit mydomain.com.
You can do this by adding one more line to the fixed version above, so it’d look like so:
www IN CNAME mydomain.com.
* IN A 192.192.192.82
mydomain.com. IN A 192.192.192.82
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, Name.com 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 :)
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.