If you want to know what is country specific redirection in blogger and its problem, please read this post first.
To avoid this problem, we need to use canonical URL tag in our template. The what?
If search engines bots encounters more than one URL of the same page, they picks the canonical URL, the best URL. So we have the tell them the one with .com is the canonical URL.
The Blogger uses several variables in its XML templates. Out of them, some have canonicalized URL form. For example, blog.homepageUrl indicates the home page URL. But there is a canonicalized form for that, blog.canonicalHomepageUrl.
Take an example of bloggerhow.blogspot.com. An user is accessing it from India. So variables will give following results.
blog.homepageUrl = bloggerhow.blogspot.in (In India)
blog.canonicalHomepageUrl = bloggerhow.blogspot.com (we need this URL)
Blogger XML variables having canonicalized forms are following.
|Blogger XML variable||Canonicalized form|
And label.url don’t have canonical form yet..
Template Hack – Default Blogger templates
If you are using Blogger default templates(templates from Blogger website), then you are almost safe. But there is a chance that users might be deleted the necessary tag.
- Got to Template > Edit HTML
- Search any of below tags
<tags b:include data='blog' name='all-head-content'/>
<tags b:include data='post' name='all-head-content'/>
These tags inserts the canonical URL in Default templates.
<head>and Save the template.
Template Hack – Custom Templates
Templates downloaded from other websites is different and we need to put following tag after <head> tag.
<link expr:href="data:blog.canonicalUrl" rel="canonical"/>
Add this in your Template > Edit HTML and save it. From now on, search engine will index the .com URLs.
Template Hack & Widget Hack – Every templates
Using above table, the pointed out variables should be replaced by canonicalized form. This can done by repeating the above steps (Edit HTML) and select Expand Widget Templates. Search replace it with canonicalized form. This will correct if you have any widget problems.
|Search and replace xml variables..|
If you are experiencing any other problems, let me know..
Share this article