April 19, 2017

How To Add rel='canonical' link to individual posts on Blogger

Canonical tags are used to denote original pages or preferred posts to avoid duplication. If canonical tag is used for a particular post, Google Bot or any other search engine bot will consider that page as original which increases the chances of indexing and crawling.
A canonical tag look like the following;

<link href='http://www.shipmethis.com/' rel='canonical'/>
Canonical tags are put between the head tags in the blogger template like the below;

<head> <link rel="canonical" href="post URL/" /> </head>
A rel attribute of the link element shows that the URl is original and if two similar posts are found, the URL with canonical tag should be considered as original.

If a page has a mobile version, the URL ends up with "?m=1". This is to show that the site in mobile version. This affects the ranking of the site as the site authority is more on the actual URL. So a canonical tag can be included to show the bot the acutal site URL.

Careful With Canonical Tags


Blogger should note that two canonical tags must not be set for two posts.
The canonical URLs should not lead to 404 not found page.
The canonical URLs should not lead to 301 redirect page.


How to Add Canonical Tags to Entire Blog

Go to Blogger template
Press CTRL+F to find the below code so you can paste the canonical tag above it. if you are unable to find the below code, add the canonical tag before </head> tag.
<b:include data='blog' name='all-head-content'/>
Copy the below code. Change the Site URL to your website / blog url and paste above the b:include data='blog' name='all-head-content  HTML code.

<link rel="canonical" href="Site URL/" />

How to Add Canonical Tags to  Individual Posts on Blogger

To add canonical tag to each posts automatically, you need to do the following steps;

Go to Blogger template dashboard

Press CTRL+F to find the below code so you can paste the canonical tag above it. if you are unable to find the below code, add the canonical tag before </head> tag.
<b:include data='blog' name='all-head-content'/>
Copy the below code and paste above the b:include data='blog' name='all-head-content  HTML code.

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

You should not change the above code as it tag call the URL tag of each posts.

Save the HTML and load any random post. Then check the source of the post by copying and pasting the below code to the browser;

view-source:post url
Change the post URL to URL of the post. Or go to the post, do right click and select "view page source". Then check whether canonical tags are appearing like the following

How To Add rel='canonical' link to individual posts on Blogger
Example of a canonical Tag



SUBSCRIBE NOW TO SHIP ME THIS



Whats Hot

About Author