domain with and without www

April 12, 2013 13.4k views
I've created two A records in DigitalOcean web DNS config it looks like this: @ XXX.XXX.XXX.XXX XXX.XXX.XXX.XXX But only (without www) is reacheable and i can ping it. nslookup also can't find what should i do to enable www subdomain?
8 Answers

Well i have to say that i have the same problem as you and it was a headache, because i did everything in the tutorial and nothing seems to work BUT!!! i wait like an HOUR for this and then it work properly.

So this was my configuration, just as the tutorial in digitalocean here in the "CNAME" section

Enter Name: www

Enter Hostname: @

Hope it helps!!

PD: My droplet has this example name: (or .net if your domain is .net, etc)

Another tech for this problem

hostname = www
ip address =

will for me.
go to your dns control panel and add a new A record

hostname =
ip adress = your droplet ip adres etc

and be sure nameservers are configured for digitalocen at your domain control panel
Maybe using the CNAME will be better solution, especially for search engines?
"www" or "www @"
thanks. solved it with cname: www @
Name Only valid hostname characters are allowed. (a-z, A-Z, 0-9, ., _ and -) Or a single record of '@'. and Data CNAMEs can not be pointed to IP address, only domain names
Got that error when trying to set a CNAME record with both:
www IP and IP

I could only set an A record with IP but still not working

I ran into this same issue and after combining a couple of the answers above, your DNS configuration for should be (with CNAME solving the www. issue):

A --> @ --> IP ADDRESS
CNAME --> * -->
NS -->
NS -->
NS -->

Have another answer? Share your knowledge.