Alister Cameron // Blogologist

Changing the world. One blog(ger) at a time.

Pagerank with and without the ‘www’ - does it make a difference?

You wanna believe it does!

Check out the difference between icq.com and www.icq.com. The latter has a PR8 and the former? PR0!

I almost fell off my chair when I saw that. But I checked it twice and that’s what it is.

So what to do about it? For me, it meant deciding which I wanted (with or without the www bit) and then 301 redirecting from the one I didn’t want to the one I wanted using a .htaccess file. This is telling Googlebot and other search spiders that might arrive at your site using the wrongly formed URL, that it’s not there and they what they’re looking for is over here.

A 301 can be done in apache (or whatever http server you’re using) or it can be done in PHP (or whatever app-server language you’re using), but I think a .htacess file (or equivalent) is simplest.

Here’s what I’ve got to do this in my .htaccess file (yes, a file literally named that, and placed in my html home directory on my site):


RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.alistercameron.com$ [NC]
RewriteRule ^(.*)$ www.alistercameron.com/$1 [R=301,L]
#extra Wordpress stuff here, coz that’s the CMS I use…
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

So there you have it. Those two lines that contain my domain name are the two lines that do it for me… change to your domain name accordingly. These two lines basically look at any domain name that sends people to my site, and if that address is not exactly www.alistercameron.com, it 301 redirects them to that instead (and to the specific page or resource they requested).

But why am I doing this, vis-a-vis the title of this post? Well, I only want Google to find the content of my site in ONE place… at www.alistercameron.com. If I don’t do the 301 redirect, I might be indexed under www.alistercameron.com and alistercameron.com, and this might have bad repercussions for my pagerank, or indexing in general. BUT… here’s what it also does…

It makes sure that anyone visiting my site will bookmark and link to me using ONLY ONE URL. It doesn’t matter what they type in to get to my site, because as soon as they get here my webserver makes sure they see my site with the www, and that’s what they will subsequently bookmark, stick in del.icio.us, or whatever.

Are there more issues to consider here? I’d love to hear from you if you’ve experienced other issues with URLs and pagerank. I don’t have proof, personally, that Google can “split” your pagerank if you accept visits to both versions of your domain (with and without the www), but if you’ve got more on that… let us all know!

UPDATE: Daniel at Daily Blog Tips has posted recently on this very same question. I think his post makes a good complement to mine. Check it out!

 Add Me
Sphere: Related Content
Internet Marketing Masterminds... success starts here!
  • Look Who's Been Here!

  • My Posts in Your In-box!

    Enter your email address here for instant updates in your inbox, whenever I post something new.
    Your email address is in safe hands. Relax!
© Copyright 2008 Alister Cameron. All Rights Reserved Theme // Sitemap // RSS