cancel
Showing results for 
Search instead for 
Did you mean: 

how to setup noindex,follow in a static page

how to setup noindex,follow in a static page

I would set the robots meta tags to "noindex,follow" in a static page.

In magento 1.9:

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

In Magento 2?

Thank you

Regards

9 REPLIES 9

Re: how to setup noindex,follow in a static page

stores -> general -> design -> and here is tab Search Engine Robots

Re: how to setup noindex,follow in a static page

No!

I want to set the meta tags - via XML - only in a static page, not at all site.

 

what is the equivalent of this code in magento2?

 

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

 

Re: how to setup noindex,follow in a static page

Add this to your layout update:

 

<head>
    <meta name="robots" content="NOINDEX,NOFOLLOW"/>
</head>

 

Re: how to setup noindex,follow in a static page

Did you get the solution? Smiley Happy

Re: how to setup noindex,follow in a static page

Hi @Riswit @kor3

 

 

We have developed a Magento 2 extension to set meta robots tag per page basis. You can use it to easily update meta robot tag for any of store pages(particular product, category, CMS page, shopping cart etc ) via admin.

 

The extension can be found at below URL

 

https://redchamps.com/meta-robots-tag-per-page-magento-2-extension.html

Re: how to setup noindex,follow in a static page

One way is to do it manually. Add the following before </head> element of the page. 

 

    <meta name="robots" content="NOINDEX,NOFOLLOW"/>

 Another way to do it is by using the following extension which automatically adds Noindex, Nofollow tag to products, category & CMS pages in Magento 2. You can use any combination of Index Follow tag i.e. NoIndex NoFollow, NoIndex Follow, Index NoFollow, or Index Follow. 

 

https://www.fmeextensions.com/no-index-no-follow-tag-magento-2-extension.html

Re: how to setup noindex,follow in a static page

Could you please share an example of how to add the code below in a specific category page?

I posted my issue on stackoverflow

 

<meta name="robots" content="NOINDEX,NOFOLLOW"/>

Re: how to setup noindex,follow in a static page

You can install this free extension: https://github.com/TidycodeIT/magento2-meta-robots

Re: how to setup noindex,follow in a static page


@SamueleMartini wrote:

You can install this free extension: https://github.com/TidycodeIT/magento2-meta-robots



I did try your extension and it did not work, it broke the entire front end.