Should you use the WWW?
You may or may not know that when accessing a web site you usually have the choice of typing in http://www.domain.com or just http://domain.com -the difference is of course whether or not you include the www. Both of these will normally bring you to the exact same web site with no cosmetic differences what so ever.
The truth is that although including or excluding the www in a url makes absolutely no difference to the end user it can have a huge impact when it comes to search engines. For example, Google and Yahoo will treat both the http://www.domain.com and http://domain.com addresses as two completely different sites. So what does this mean? Well it means several things one of which is duplicate content. The search engines will see that both sites (although its the same site) have the same content and will therefore most likely exclude one from the search engines. With regards to Google PageRank your site will also be trated as two different sites each one having its own pagerank values assigned to it.
The fix is easy! Firstly decide whether you want to use the www version or the non-www version. To be honest it doesn’t really matter which one you use as long as you use just one of them. Then, you can either use some sort of 301 redirection or add one of these snippets of code into your .htaccess file.
Removing the www
1 2 3 | RewriteEngine On RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L] |
Forcing the www
1 2 3 | RewriteEngine On RewriteCond %{HTTP_HOST} ^domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] |
Of course in the examples above make sure you replace “domain.com” with whatever your actual domain is. This topic has been further explained – read Remove the “www” from your URLs for more information.




