If you're new here, you may want to subscribe to my RSS feed or email alerts. Thanks for visiting!
If you own your domain, you must have noticed that your site resolves to your domain with or without the ‘www’ prefix. So basically, visitors can come to your site either way. Does that affect your Google juice because does it treat it like two separate domains? I have seen referrals from both in my Mint and wished I could redirect it to just one address for simplicity reasons at least. Google prefers you specify your preferred domain name so as to help them determine PageRank more accurately.
I found a simple solution on John Chow’s website. You have to modify your .htaccess file and add the following code:
RewriteEngine On
RewriteCond %{HTTP_HOST} !^(.*)\.ipatrix\.com$ [NC]
RewriteRule ^(.*)$ http://www.ipatrix.com/$1 [R=301,L]
Change ‘ipatrix’ to your domain. This change redirects anyone coming to ipatrix.com to www.ipatrix.com.I made the changes to my .htaccess file and it worked like a charm. If you use the Performancing Plugin in Firefox to write your posts, you might want to reconfigure the setting to include the ‘www’ prefix.
Update: I just noticed that this fix doesn’t really work for individual posts. For e.g if you had a page http://domain.com/post-name, the above code redirects it to the main page i.e. http://www.domain.com instead of http://www.domain.com/post-name. Since I am not sure how the above code can be modified, I suggest you use Enforce WWW Preference plugin. This will use whatever preference you specify in your blog URL settings.
Article Tags >> Technology | WordPress | World Wide Web


February 1st, 2007 at 12:25 pm reply
I have done the exact opposite, I support no-WWW :-)
February 1st, 2007 at 1:03 pm reply
Abhijit, I understand your point too. As long as readers don’t have to type in the extra letters, I am fine with either ways. I agree with John that ‘www’ helps to differentiate between other prefixes like ftp, etc.
February 1st, 2007 at 5:33 pm reply
Uhm, no-www.org. Really.
February 1st, 2007 at 6:08 pm reply
Paul, Dinn know no-www was a movement. Really. :)