SEO Video Blog - Canonical Link Element #44
Author:
Nick
SEO Videos
Welcome to this weeks SEO video blog, We are going to return to canonicalisation and how to correctly implement the canonical link element.
The principle behind canonicalisation link elements is to normalise your URL’s, this then helps search engines decide which of your pages is the authority for a particular piece of information and also allows Google to direct any link juice to the correct URL helping you search engine positions.
These can be important for content management systems and eCommerce website that generate identical pages with different URL’s. We have previously done a more in depth video on canonicalisation and webmaster tools blog also have an excellent video with Matt Cutts from Google explaining the principles, both of these are linked from the supporting blog post.
We have created a simple piece of php code which allows your to canonicalise your website quickly and easily, this weeks tutorial will show the installation and you can get the code from the blog post.
The implementation on this dynamic canonical link element is for php apache servers, it will allow you to tell Google which page is the authority for the content displayed.
The code does this in 2 ways, firstly It shows the full domain ie. www.domain.co.uk, so you have no issue with Google treating domain.co.uk as the primary source of content. You can also specify this in webmaster tools or use a .htaccess file to re-direct.
Secondly, if you have folder on your server, for example /downloads/canonical/ and you want this folder to be classed as the authority, you can use the code supplied.
<link rel=”canonical” href=”http://www.crearecommunications.co.uk<?php echo str_replace(”index.php”, “”, preg_replace(”/\?[\w&\-\_\=]+/”,”",$_SERVER['REQUEST_URI']));?>” />
I have set an example on creare communications.
so we can see i have added the code to the header in my index.php file. Now when I upload the file and view the source of the index.php page, it displays within the canonical link element the URL /downloads/canonical/ and not /downloads/canonical/index.php, This means if Google finds this page it will automatically know that I want the origin of the pages content to lie with / and not index.php
We hope this helps you inform Google of your primary content and exclude any duplicate content issues, along with that it will help natural back links that are currently linked to the wrong URL to be re-directed to the canonical URL.
Thanks for watching if you have any questions or comment please leave them on the Youtube channel or supporting blog post.

