Preferred Domain Hell
Jun 27th, 2007 by Deuce
I’ve been trying to make it so that the site always loads with the “www” in the address regardless of whether or not it is entered in the address bar of the browser. This apparently improves the Google PageRank rating since otherwise the site may get processed as if it were two distinct sites with two different URLs: one with “www” and one without. This is discussed in detail by John Chow and his readers here. I found several methods to force that action on various sites. The most popular method seems to be the addition of some redirect code in the “.htaccess” file at the root of the site, but it just did not seem to work for me at all. I also tried to do it via the “index.php” file with some similar code, but that was even worse as I kept getting syntax errors. Finally, I tried a couple of WordPress plug-ins with mixed results. Ultimately, it was the “enforce-www-prefences” plug-in authored by Mark Jaquith that worked for me. He has a nice site with good content and many other plug-ins and it is called Tempus Fugit.