Support » Localhost Installs » "www" not resolving but just teh domain name works

  • Resolved BTBTB


    This just started happening and I have multiple WordPress installs on this server. It happens with all of my WordPress installs on this server. when I use it resolves to a blank page

    Here is the issue
    when I just use the domain name without the www prefix WordPress loads the site perfectly.

    It just started happening… we confirmed that it is not a DNS issues as other sites on this server work fine with the www. prefix, its just the WordPress installations.

    Was I hacked and if so, or is there a fix?

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Try adding the following code to your htaccess file:

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
    RewriteRule ^(.*)$$1 [R=301,

    Thanks Andrew – that did indeed solve the problem. Would you know why these lines could have been removed from the htaccess file? None of our administrators were working on the site and this seemed to have happen to all of our WordPress installations on the shared “localhost” server. I’m wondering if I should be looking at any plugins or themes but they are seem pretty standard?

    I’m not sure why that would’ve happened. If you recently upgraded WordPress, that might be it. I had to have WordPress re-initialize my htaccess after a recent update (though it was a beta update, so I don’t know if that applies here.)

    Also, you said it was a localhost server. Is it apache or something else? Did you update it recently? It might have changed how it handles htaccess handling.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘"www" not resolving but just teh domain name works’ is closed to new replies.