Report this

What is the reason for this report?

www not working with Wordpress and Apache

Posted on October 18, 2014

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!



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!

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.

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?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.