DNS issues on new droplet (Using www does not work)

July 12, 2013 7k views
Hi, I just created my first Droplet and changed my DNS to DigitalOcean. I've reviewed the following forum thread (https://www.digitalocean.com/community/articles/dns-tips-and-tricks), but I'm still having issues - my domain works without the www, but not with. I've also checked the vhosts configuration and it looks ok. (This is the same vhost configuration file I was running on a Linode server also using Fedora) Any help is appreciated. Details: whois paulcutler.org shows I'm using the right DNS server, so I know it's propogated. Running dig shows the same thing: dig paulcutler.org @ns1.digitalocean.com ; <<>> DiG 9.8.3-P1 <<>> paulcutler.org @ns1.digitalocean.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER< ServerAdmin paul.r.cutler@gmail.com ServerName www.paulcutler.org ServerAlias paulcutler.org *.paulcutler.org DocumentRoot /var/www/paulcutler.org/public_html/ ErrorLog /var/www/paulcutler.org/logs/error.log CustomLog /var/www/paulcutler.org/logs/access.log combined I've also tried using: NameVirtualHost *:80 ServerAdmin paul.r.cutler@gmail.com ServerName paulcutler.org ServerAlias www.paulcutler.org DocumentRoot /var/www/paulcutler.org/public_html/ ErrorLog /var/www/paulcutler.org/logs/error.log CustomLog /var/www/paulcutler.org/logs/access.log combined Starting Apache with -S does not have any errors, so I don't think it is the vhost configuration. This thread (https://www.digitalocean.com/community/questions/xyz-com-sites-opens-properly-but-www-xyz-com-gives-error-is-it-coz-of-my-vhost-setup) makes me think DNS is not configured for www properly, but I'm not having much luck finding any answers on Google. Any hints or tips are appreciated! Thanks. Paul
4 Answers
I got some help in IRC - it turns out I needed to create an A record for www in the Droplet DNS panel.


I know you have already found an answer, but you can also create a CNAME to your @ A record if they are the same IP. This adds a bit of simplicity to your zone file and makes it easier to update the IP of both records if you ever need to update it.
@mureta: I believe you created a support ticket about this. Let's discuss it there.
Have another answer? Share your knowledge.