How to add www subdomain

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!

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>; IN A <br> <br>;; ANSWER SECTION: <br> 1800 IN CNAME <br> 1800 IN A <br> <br>Looks OK to me. Wait for your local cache to expire.

I looked at <br>and solved the issue for now. <br> <br>I had to add an A record instead of a CNAME. <br> <br>Also see <br>