Always add the www

When creating a new website you want to create as little duplicate content as possible. Most host let your users access your website from either the http://abluestar.com or the www version http://www.abluestar.com. This can be dramaticly reduce your site’s Page rank because is that most search engines see the ‘www’ and the ‘non www’ version as two different websites and Googles’s Page rank is split between the two sites. Instead of getting a solid PR4 you get two measly PR2 sites.

There is a solution
You can force your users browser to redirect to the www version with a Mod Rewrite script.

Directions

  1. Create a new file called .htaccess
  2. Copy and past the snippet below in to the file.

    RewriteEngine on
    RewriteBase /
    # Always add the www
    RewriteCond %{HTTP_HOST} !^www.abluestar.com$
    RewriteRule ^.*$ http://www.abluestar.com%{REQUEST_URI} [R=301,L]

  3. Replace ‘abluestar.com’ with your domain (replace in two locations)
  4. Upload the file to your base directory on your web server.

The next time your users try to browse to your non ‘www’ version of your website they will be automatically forwarded to you www version.

Comments (2) left to “Always add the www”

  1. Jordan Lapp wrote:

    Funvill,

    I tried this and it screwed up my “comments”. The blog worked fine, but clicking on the comments tag netted me a 404.

  2. funvill wrote:

    Try adding ‘www’ to the wordpress address in the options tab.

    options->general->wordpress address or
    options->general->Blog address

Post a Comment

*Required
*Required (Never published)