How To Add Canonical Link In Blogger

How To Add Canonical Link In Blogger
Canonical link is a link tag in the header of HTML document that tells search engines the preferred location of this url. Canonical link is an useful instruction for search engines to deal with duplicate content problems. If your site has identical or vastly similar content that’s accessible through multiple URLs, this format provides you with more control over the URL returned in search results. It also helps to make sure that properties such as link popularity are consolidated to your preferred version.

How does canonical link work?

Let’s take an example from Blogger. Image that your post has an URL like this:

http://name.blogspot.com/2012/05/test-post.html

When someone comments on this post, you’ll get an URL for the comment like this:

http://name.blogspot.com/2012/05/test-post.html?showComment=1274536664324#c2570377970603461164

These urls point to the same web page. So, search engines will recognize a duplication content case here. To prevent this, we can put a canonical link in the header of blog that tells search engines the preferred version of url is http://name.blogspot.com/2012/05/test-post.html. The link tag is simple like this:

link rel="canonical" href="http://name.blogspot.com/2010/05/test-post.html" />

Google will understand that the duplicates all refer to the canonical URL: http://name.blogspot.com/2012/05/test-post.html. Additional URL properties, like PageRank and related signals, are transferred as well.

How to put canonical link in Blogger

Open your Blogger template file (or navigate to Dashboard → Template → Edit HTML) and find this line:

b:include data='blog' name='all-head-content'/>

If it’s found, that means your template supports canonical already (actually, Blogger does it automatically for you).
If the line is not found, then you have to add the link tag manually. Just add the following code before the /head> tag:

link rel='canonical' expr:href='data:blog.url'/>

That’s all!
The canonical link is supported by major search engines: Google, Yahoo!, Bing and Ask. Using canonical link in right way is a good practice for improving SEO level of your blog.

Post a Comment

Previous Post Next Post