301 redirect to the “www” site
Fred Morgan – seoexploration.com
With the modern style of losing the “www” at the beginning of the website URL you may encounter problems – especially with statistical analysis programs.
I’m not really concerned with the semantics of whether one should or should not use the starting “www” but being of the old school I still tend towards using it. These days most hosting facilities utilise the dual base directories of “public_html” and “www” where “www” is the automatic clone of the “public_html” directory so, under normal circumstances, either URL will work fine.
However, I have seen browser cache problems give display problems identifying a difference between them – i.e. missing favicon images and intermittent flash errors etc. It took me a long time before I identified where the problem actually lay. Everyone always identifies the standard cache reload fix but not that you may be varying the actual URL (www) search which can happen when using previous saved browser shortcuts or bookmarks.
.htaccess
I always now use a 301 redirect with the following script in my .htaccess file which redirects my incoming URLs to www however this step should only be taken by those who understand that problems could follow if incorrect editing is done. Firstly create a backup copy of your original .htaccess file just in case things get messed up. Now add the following 3 lines of 301 redirection code
(note : aaaaaaaa.bbb is tobe replaced by your website URL i.e. okikoki.com)
RewriteEngine On
RewriteCond %{HTTP_HOST} ^aaaaaaaa.bbb
RewriteRule (.*) http://www.aaaaaaaa.bbb/$1 [R=301,L]