Let’s take a look into this another aspect of SEO. The canonicalization of URLs. What is a Canonical URL and what is its use?
A canonical URL is the one which is to be preferred the most when various URLs may point towards the same page. For better understanding take the following example:
The landing page of your website is the homepage of your website. If your domain is yoursite.com suppose, you can have various versions of your homepage like :
and much more.
Now here is the need of canonical URL. For search engines like Google, “www.yoursite.com” and “http://yoursite.com” are completely different URLs. There may be totally different content on both the URLs. Different or not, having two different URLs pointing towards the same content can create duplicate content issues which are even more severe and punishable. It is also advised to keep only one version of your blog’s URL. Either www or non-www. If you have some backlinks pointing to your www version and some pointing to non-www version, you are clearly leaking pagerank from your blog. It is better to canonicalize your URLs so as to make all your pagerank flow to only one URL.
How to Use Canonical URLs?
The most common ways of using and implementing canonical URL are :-
- Setting Preferred Domain :- You can set your preferred domain in your Webmasters account to let search engines know which is the domain they should go after. Google Webmsaters can easily do this. I have set my preferred domain in my Google Webmasters account.
- Using Canonical Tag :- You can use rel=”nofollow” attribute to set canonical URL . You have to use a <link> for this purpose. Don’t worry this is much easier than it sounds. If your preferred URL for a page is “http://mysite.com/page1.html”, then you need to add the following code to the <head> sections of the non-canonical URLs:
<link rel=”canonical” href=”http://mysite.com/page1.html”>
That was easy isn’t it.
Another way of implementing canonical URL can be 301 redirects or htaccess redirects. You can use this tutorial to redirect your domain from www to non-www and vice-versa. You can also add these redirects in the cpanel of your web hosting account.
So this was all related to the SEO of canonical URL. You can easily apply above tactics to make sure do not lose any rankings, traffic or link juice knowingly or unknowingly.