Redirecting Non-WWW to WWW
This is pretty basic stuff, but it is surprising how many webmasters forget this (even owners of bigger sites).
Search engines interpret the non-www version of your site’s URL (http://website.com) as a different page to the www version (http://www.website.com). This means that links to your site can be split between the two versions and can also effect the accuracy of web statistics.
This re-write condition for an Apache .htaccess file creates a permanent redirect from the non-www version to the www version:
RewriteCond %{HTTP_HOST} ^website\.co\.uk
RewriteRule (.*) http://www.website.co.uk/$1 [R=301,L]</pre>
If there are no other rewrite rules in the .htaccess file, the rewrite engine will need to be turned on using this line before the above commands:
RewriteEngine On
Posted: December 13th, 2007 under Search Engine Optimisation.
Comments: Leave yours - 2 so far
Bookmark:
