I am new to zone business stuff. I have domain.com which resolves to my droplet IP and the website loads. However, when I use www.domain.com prefix, DNS does not resolve.
I added CNAME record for www.domain.com which points to domain.com. but it still does not work. When I execute dig on domain.com I get NOERROR, but dig www.domain.com returns status: NXDOMAIN.
I am pretty certain my nginx configuration is good. How do I get the www prefix to work?
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!
My zone file:
$TTL 1800 @ IN SOA NS1.DIGITALOCEAN.COM. hostmaster.domain.com. ( 1411275820 ; last update: 2014-09-21 05:03:40 UTC 3600 ; refresh 900 ; retry 1209600 ; expire 1800 ; ttl ) IN NS NS1.DIGITALOCEAN.COM. NS NS2.DIGITALOCEAN.COM. NS NS3.DIGITALOCEAN.COM. @ IN A 162.nnn.nn.nn www.domain.com CNAME domain.com.
Correct Syntax for Cname is :
www.domain.com. 86400 IN CNAME .
note the dot in the end
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.