Canonical URLs

How to make sure your website only responds to www.domain.co.uk rather than domain.co.uk.

You will need to add the following code to your htaccess file (or create an htaccess file if you don't already have one), then upload it to the root of your website.

The code you need is

[START CODE]
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]
[END CODE]

Replace example with your domain.

Dont forget to get your FTP program to show hidden files if you can not see your htaccess file.

If you need abit more info on canonical URLs, this blog from Matt Cutt (Google SEO) is an easy read.

Matt Cutts on Canonical URLs