Canonical URLs

How to make sure your website only responds to rather than

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

RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$$1 [L,R=301]

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