Tuesday 29 September 2009

Website optimisation and url canonicalization

Canonicalization is a term that relates to the domain name (URL) of your website.  It is important as most people do not realise that search engines view the domain name (URL) http://www.yoursite.co.uk and http://yoursite.co.uk as being totally independent of each other.

To see if your website  may be at risk try this in another browser window.  Enter the url of your website using both http://www. and just http://.  If they both work your website may be being penalised by search engines for one of the biggest sins of all - "duplicate content".

Fortunately the answer to the problem is really simple.  Add a .htaccess file to your server in the same directory as your home page.

The content of the .htaccess file should be:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^yourwebsite\.co.uk
RewriteRule (.*) http://www.yourwebsite.co.uk/$1 [R=301,L]

Just replace "yourwebsite" with your actual url.  That is it!  The .htaccess file  basically redirects all calls to http://yoursite.co.uk to http://www.yoursite.co.uk.  This consolidates all your existing links and prevents search engines from downgrading your website due to duplicate content issues.


You will be amazed what the effect can be..   in just three lines of code.  If you think there may a problem with your website but not sure how to go about things.  Give us a call or drop us an e-mail and we will see what we can do.

Good luck.
PS the code cannot be written in a word processor as they add hidden characters to format text.  Use notepad or something similar.  You will need an ftp programme to upload the file to your server.

Labels: ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home