When you find yourself needing to make this decision you need to decide exactly what you are trying to achieve.

The likelihood is that you have duplicate content or you want to change the URL of a page. If neither of these applies to you, then you are probably reading the wrong article.

If you are trying to change the URL of your page, then you are effectively moving it to a new location, to do this you should use the 301 "Permanently Moved" header status to tell search engine spiders where your web page has moved too. This will then remove your old page and pass on any link authority to the page that it has moved too.

You should only use the canonical tag if you have more than one version of the same page indexed in Google. For example if /index.php?action=true showed exactly the same content as index.php and both the pages were indexed in Google, then you could get penalized for having duplicate content. The canonical tag works as a suggestion tool telling Google which version of the page you want to be indexed, so the other pages (same page) will get ignored.

You can add a canonical tag by placing this code in the part of the HTML document:

<link rel = canonical href = your-website />.

There are many different ways you could add a 301 re-direct. This depends on what type of server you have. The most common way of doing this is by using PHP or by using a.htaccess file. This can be easily found on the internet.

Source by Gavin Davies