This is a quick post on a crawling error that was causing issues for most of you. For over a year we were all scratching our heads on why Blogger is showing two meta descriptions for homepage and post pages. Webmaster tools shows duplicate meta description error for blogger homepage and individual item pages that are posts. If you view your blog's source file then you will find two meta descriptions for the same page. One below <head> tag and one just above <title> tag. This double occurrence of meta tags for description appeared when blogger introduced Search preferences last year that offered blogspot users to insert dynamic description for every post they publish. This option is present inside Blogger's Post editor as "Search Description".
- Check out: What is Meta Description?
How to fix duplicate Description error?
Last year we shared the code that will install dynamic search description option even in custom templates. If you are using that code then its extremely easy to fix the error. If in case you have not yet added that code or you use Blogger Template's styles then you may simply add the code I will share in today's tutorial.
Follow these easy steps:
- Go To Blogger > Template
- Backup your template
- Click Edit HTML
- Search for the following code:
<b:if cond='data:blog.metaDescription != ""'>
<meta expr:content='data:blog.metaDescription' name='description'/>
</b:if>
Note: If you can not find this code then do not panic and skip this step and follow step#5.
5. Now replace the above code with following set of codes:
<b:if cond='data:blog.pageType != "index"'>
<b:if cond='data:blog.pageType != "item" and data:blog.pageType != "static_page"'>
<b:if cond='data:blog.metaDescription != ""'>
<meta expr:content='data:blog.metaDescription' name='description'/>
</b:if>
</b:if>
</b:if>
Note: For those of you who could not find the code in step#4, then you may simply copy the above code (in step#5) and paste it just below <head>
- The purple code will disable duplicate occurrences on homepage and Search/Archive pages
- The green code will disable duplicate occurrences on Post Pages and Static pages
Need help?
I hope this improvement will further optimize your blogspot code structure and will help robots to better crawl and index your content. Please let me know if you needed any help. A great surprise is coming for those who live in our city. We are coming in public again with several new business strategies and ideas. Would love to see you guys this time. Peace and blessings buddies :)