Skip to main content
Tweeted twitter.com/StackMagento/status/740699427543916544
added 8 characters in body; edited tags
Source Link

I want to set

<action method="setRobots">
    <value>NOINDEX,FOLLOW</value>
</action>

For category page but only when any filter is selected.

So I did the following..

<catalog_category_layered translate="label">
    <reference name="head">
        <action method="setRobots">
            <value>NOINDEX,FOLLOW</value>
        </action>
    </reference>
</catalog_category_layered>

But it's loading that tag when any filter is not selected.when any filter is not selected.

So basically

When URL is like as following

http://www.example.com/category/cate1.html

I want to it to be indexed. But when URL is like following

http://www.example.com/category/cate1.html?size=xl

I don't want it be indexed.

Any suggestion what should I do??

I want to set

<action method="setRobots">
    <value>NOINDEX,FOLLOW</value>
</action>

For category page but only when any filter is selected.

So I did following..

<catalog_category_layered translate="label">
    <reference name="head">
        <action method="setRobots">
            <value>NOINDEX,FOLLOW</value>
        </action>
    </reference>
</catalog_category_layered>

But it's loading that tag when any filter is not selected.

So basically

When URL is like as following

http://www.example.com/category/cate1.html

I want to it to be indexed. But when URL is like following

http://www.example.com/category/cate1.html?size=xl

I don't want it be indexed.

Any suggestion what should I do??

I want to set

<action method="setRobots">
    <value>NOINDEX,FOLLOW</value>
</action>

For category page but only when any filter is selected.

So I did the following..

<catalog_category_layered translate="label">
    <reference name="head">
        <action method="setRobots">
            <value>NOINDEX,FOLLOW</value>
        </action>
    </reference>
</catalog_category_layered>

But it's loading that tag when any filter is not selected.

So basically

When URL is like as following

http://www.example.com/category/cate1.html

I want to it to be indexed. But when URL is like following

http://www.example.com/category/cate1.html?size=xl

I don't want it be indexed.

Any suggestion what should I do??

Source Link
Kaushal Suthar
  • 3.2k
  • 6
  • 32
  • 57

Handle for Category page when filter is applied

I want to set

<action method="setRobots">
    <value>NOINDEX,FOLLOW</value>
</action>

For category page but only when any filter is selected.

So I did following..

<catalog_category_layered translate="label">
    <reference name="head">
        <action method="setRobots">
            <value>NOINDEX,FOLLOW</value>
        </action>
    </reference>
</catalog_category_layered>

But it's loading that tag when any filter is not selected.

So basically

When URL is like as following

http://www.example.com/category/cate1.html

I want to it to be indexed. But when URL is like following

http://www.example.com/category/cate1.html?size=xl

I don't want it be indexed.

Any suggestion what should I do??