www not working with Wordpress and Apache

October 18, 2014 1.8k views


I’ve installed Wordpress with Ubuntu (Apache) using the application and tutorial you provide. Using the Wordpress panel I changed the URL to http://www.mydomain.com but now it doesn’t work having the site crashed, but it works when I put http://mydomain.com. What am I doing wrong? I have this on my GoDaddy account:

@ MY IP 1 day

ftp @ 1 hour
www @ 1 hour

Thanks in advance!

1 Answer

Open /etc/apache2/apache2.conf in nano as root:

sudo nano /etc/apache2/apache2.conf

Find the line that says Servername your droplet's IP address (you can search by pressing Ctrl-W, typing your IP address, and pressing Enter) and make sure the line below it looks like this:

ServerAlias www.yourdomain.com yourdomain.com

Then, restart Apache:

sudo service apache2 restart

If that doesn’t fix it, can you post the actual domain name?

Have another answer? Share your knowledge.