Add NOINDEX,FOLLOW to layered navigation pages

In an earlier post we described a technique to add ‘rel=nofollow’ to all the layered navigation links on the category pages (it’s really just duplicate content of the category pages) and will save server resources by not having the robots fetch all those layer navigation pages.

Another method that will tell the search engines not to index your layered navigation results pages is to add a ‘noindex,follow’ meta directive so that they won’t index the page but will follow the links to the items on those pages.

OPEN: app/design/frontend/YOURPACKAGE/YOURTHEME/layout/local.xml

(If you don’t have a local.xml file, check to make sure your particular template doesn’t use a variation of the local.xml file under a different naming convention)

add the following section:


<!-- Added for Category layered navigation meta tags -->

<catalog_category_layered>
<reference name="head">
<action method="setRobots"><meta>NOINDEX,FOLLOW</meta></action>
</reference>
</catalog_category_layered>

<catalog_category_layered_nochildren>
<reference name="head">
<action method="setRobots"><meta>NOINDEX,FOLLOW</meta></action>
</reference>
</catalog_category_layered_nochildren>

<!-- END Added for Category layered navigation meta tags -->

Install the change, clear your cache and you’ll notice all your layered navigation pages now have a ‘noindex,follow’ meta directive which should reduce any duplicate page content issues yet ensure your products links are followed.

This method tells the robots NOT to index any of your category pages that have layered navigation on them – if you’d rather the pages be indexed but not the layered navigation links, it’s better to use the ‘rel=nofollow’ method described in the earlier post.

 

Leave a Reply