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".
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.- Read this: Why Meta Description is not showing up in Custom templates?
- Go To Blogger > Template
- Backup your template
- Click Edit HTML
- Search for the following code:
<b:if cond='data:blog.metaDescription != ""'>Note: If you can not find this code then do not panic and skip this step and follow step#5.
<meta expr:content='data:blog.metaDescription' name='description'/>
</b:if>
5. Now replace the above code with following set of codes:
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>
<b:if cond='data:blog.url != data:blog.homepageUrl'> <b:if cond='data:blog.pageType != "item"'> <b:if cond='data:blog.metaDescription != ""'>
<meta expr:content='data:blog.metaDescription' name='description'/>
</b:if>
</b:if> </b:if>
- The purple code will disable duplicate occurrences on homepage
- The green code will disable duplicate occurrences on Post Pages
0 blogger-facebook:
Post a Comment