Alhamdulilah I am back to work and free from those terrible exams. I am calling them terrible because they really were! 😛 Just like the new errors in Blogger appearing every day, it has become difficult to find and fix all of them but this is error is a one that was causing issues for over a year and every blogger was scratching his head that why was Blogger showing not one but two meta descriptions both on the homepage and posts. Google Webmaster Tools had also been showing duplicate meta description error for blogger Homepage and individual post pages. Simply go to your blog and press CTRL + U to open your blog’s source file and then you will find two meta descriptions for the same page. One somewhere below the <head> tag and one just above <title> tag. This problem of the double occurrence of the meta tags started just last year when Blogger introduced Search Preferences so that bloggers could add a dynamic description to every post that they publish. This option is present in Blogger’s Post Editor named as “Search Description“.
This problem was fixed some days back by my friend Mohammad who is one of the best bloggers and blogs at MyBloggerTricks. All credits are owned by him. If you wish to share this tutorial, then kindly link back to him and this page.
Fix Duplicate Meta Description Error
- Check out: What is Meta Description?
Last month we shared with you guys the codes that will make the dynamic search descriptions option should be installed even in a custom template. But if you are not using that code, then its extremely easy to fix the description error. If in case you haven’t added the code to your template, then you may simply do so by just adding the code that I will share in today’s tutorial.
Just follow these simple steps:
- Go To Blogger > Template
- Backup your template.
- Click the Edit HTML button.
- Search for the following code:
<b:if cond='data:blog.metaDescription != ""'> <meta expr:content='data:blog.metaDescription' name='description'/> </b:if>
Note: If you don’t find the above code, then just relax and simply follow step 5
5. Now replace the above code with following chunk of codes:
<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>
Note: Those who couldn’t find the code in step 4, don’t worry and simply copy the above code (in step 5) and paste it just below <head> tag.
- The purple code will disable duplicate occurrences of the descriptions on the homepage.
- The green code will disable duplicate occurrences on of the descriptions on Post Pages.
6. Save your template and you are all done!
Now visit your homepage or any post page and click CTRL + U to check its source file. You will find only one occurrence of the meta description. 🙂
I hope this improvement of the template of your blog will further SEO optimize your template structure and will help search robots to easily better index and crawl all your content. Please just let me know if you needed any help. Peace and blessings buddies 🙂