Question

www not working with Wordpress and Apache

Posted October 18, 2014 2.5k views

Hi,

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:

A
@ MY IP 1 day

CNAME
ftp @ 1 hour
www @ 1 hour

Thanks in advance!

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.

×
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?

Submit an Answer