Question

How to add www subdomain

I bought a domain from namecheap.com and set up my domain (conceptgrapher.org) 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 conceptgrapher.org from the browser, but I also want to access www.conceptgrapher.org

After some googling I found http://support.godaddy.com/groups/dns-management-and-services/forum/topic/adding-www-to-my-domain-name/

According to my understanding I need to add a CNAME record. So I added a CNAME from the DNS tab in the cloud.digitalocean.com console: Enter Name: www Enter hostname: conceptgrapher.org. (with a ‘.’ in the end)

I’ve attached a screenshot of the values I entered too: http://imgur.com/1REv6rO

But www.conceptgrapher.org remains unresolved: $ nslookup www.conceptgrapher.org Server: 127.0.0.1 Address: 127.0.0.1#53

** server can’t find www.conceptgrapher.org: NXDOMAIN

But just conceptgrapher.org works fine $ nslookup conceptgrapher.org Server: 127.0.0.1 Address: 127.0.0.1#53

Non-authoritative answer: Name: conceptgrapher.org Address: 146.185.175.174

How to resolve the issue? Thanks!

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

;; QUESTION SECTION: <br>;www.conceptgrapher.org. IN A <br> <br>;; ANSWER SECTION: <br>www.conceptgrapher.org. 1800 IN CNAME conceptgrapher.org. <br>conceptgrapher.org. 1800 IN A 146.185.175.174 <br> <br>Looks OK to me. Wait for your local cache to expire.

I looked at https://www.digitalocean.com/community/articles/how-to-set-up-a-host-name-with-digitalocean <br>and solved the issue for now. <br> <br>I had to add an A record instead of a CNAME. <br> <br>Also see http://stackoverflow.com/questions/2861372/mydomain-com-a-record-or-cname <br>