How to add www subdomain

November 14, 2013 7.6k views
I bought a domain from and set up my domain ( for a droplet running ubuntu 12.04. I have an nginx server listening on port 80 in the droplet. I'm now able to access from the browser, but I also want to access After some googling I found According to my understanding I need to add a CNAME record. So I added a CNAME from the DNS tab in the console: Enter Name: www Enter hostname: (with a '.' in the end) I've attached a screenshot of the values I entered too: But remains unresolved: $ nslookup Server: Address: ** server can't find NXDOMAIN But just works fine $ nslookup Server: Address: Non-authoritative answer: Name: Address: How to resolve the issue? Thanks!
1 comment
2 Answers
; IN A


Looks OK to me. Wait for your local cache to expire.
I looked at
and solved the issue for now.

I had to add an A record instead of a CNAME.

Also see
by Etel Sverdlov
This article walks you through setting up the DNS for your site. The tutorial includes steps to set up an A records, point your nameservers, and provides some information about MX records.
Have another answer? Share your knowledge.