Prevent search crawlers indexing my Archive pages

If your blog archive only has one post for a given page, say 'March 2016', then the content overlap for that post is very high when comparing the blog archive page to the actual post page. This can lead to the archive and the post both showing as results when you run a search.

To prevent this happening, you can add a meta tag to your template.

  1. Go to Template => Edit HTML
  2. Search for 'all-head-content'
  3. Add the following underneath the tag for all-head-content
 <b:if cond='data:blog.pageType == "archive"
                or data:blog.searchQuery != ""
                or data:blog.searchLabel != "" '>
    <meta name="robots" content="noindex" />
  </b:if>

This will cause the noindex meta tag to be rendered on archive and search pages, preventing duplicate results for the content in your post.

Happy Blogging!

Comments

Popular posts from this blog

Rotate my Blogger images

Remove the header image for posts in Emporio

Get nicer thumbnails for my Post snippets