cancel
Showing results for 
Search instead for 
Did you mean: 

Set Robots Meta in Review List and View Pages

SOLVED

Set Robots Meta in Review List and View Pages

I created a local.xml file in app/design/frontend/custom_package/custom_theme/layout/ directory and added this code:

 

<?xml version="1.0" ?>
<layout version="0.1.0">
   <review_product_list>
      <reference name="head">
         <action method="setRobots">
            <value>noindex, nofollow</value>
         </action>
      </reference>
   </review_product_list>

   <review_product_view>
      <reference name="head">
         <action method="setRobots">
            <value>noindex, nofollow</value>
      </reference>
   </review_product_view>
</layout>

 

When I reload review page html contains "index,follow". How can I solve?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Set Robots Meta in Review List and View Pages

Hi @GPutignano,

 

Your code has an error.

On review_product_view you are not closing the action node.

The right code should be:

 

<?xml version="1.0" ?>
<layout version="0.1.0">
    <review_product_list>
        <reference name="head">
            <action method="setRobots">
                <value>noindex, nofollow</value>
            </action>
        </reference>
    </review_product_list>

    <review_product_view>
        <reference name="head">
            <action method="setRobots">
                <value>noindex, nofollow</value>
            </action>
        </reference>
    </review_product_view>
</layout>

View solution in original post

5 REPLIES 5

Re: Set Robots Meta in Review List and View Pages

Hi @GPutignano,

 

Your code has an error.

On review_product_view you are not closing the action node.

The right code should be:

 

<?xml version="1.0" ?>
<layout version="0.1.0">
    <review_product_list>
        <reference name="head">
            <action method="setRobots">
                <value>noindex, nofollow</value>
            </action>
        </reference>
    </review_product_list>

    <review_product_view>
        <reference name="head">
            <action method="setRobots">
                <value>noindex, nofollow</value>
            </action>
        </reference>
    </review_product_view>
</layout>

Re: Set Robots Meta in Review List and View Pages

@Damian Culotta Many thanks. I updated the code, refreshed the cache but it doesn't work.

Re: Set Robots Meta in Review List and View Pages

I've created a local.xml layout update into the rwd theme (a vanilla Magento installation) and has worked.

Maybe you have another module or layout update changing your theme?

Re: Set Robots Meta in Review List and View Pages

I'll try to disable creareseo extension.

Re: Set Robots Meta in Review List and View Pages

I was wrong with the name of the file, not local.xml but layout.xml. I apologize for the error.