Non www domain name resolves to www intermittently

My site is, the domain name with the “www” resolves fine every time. If you type in only: , it will either take you to a blank screen or occasionally it will resolve correctly to as it is supposed to.

The fact that the domain does not resolve correctly to every time is what my problem is.

<strong>Setup:</strong> WordPress 3.7.1 LAMP stack (Ubuntu 12.10)

<strong>What I’ve done so far:</strong> -Activated htaccess in Apache ( -Reviewed my htaccess file and made sure I am using the standard configuration. <pre># BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>

END WordPress</pre>

<strong>Not sure if this matters:</strong> -If you tell it to go to a page/or login such as it will go with no issues, even though the www is not in the address. -My site is not located in /var/www it is in /home/wordpress/public_html

Any thoughts or ideas on what this could be are appreciated!

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

When you created your cloud server, what hostname did you assign to your droplet in the DigitalOcean control panel? You may need to swap the values for your <code>ServerName</code> and <code>ServerAlias</code> directives, if you specified a hostname of <code></code>. <br> <br>Then, execute: <br><pre>sudo service apache2 restart</pre>

Yes, I’ve seen that tutorial. The only item that was of help in it was regarding the apache configuration file in /etc/apache2/sites-enabled/ I made two changes; 1)Servername 2) ServerAlias (oddly was resolving just fine shortly after making the adjustment to this file, now it is back to being intermittent) <br> <br>Was there something else you were trying to point out?

Check out <a href=“”>One-Click Install WordPress on Ubuntu 12.10 with DigitalOcean</a>.