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
stores -> general -> design -> and here is tab Search Engine Robots
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>
Add this to your layout update:
<head> <meta name="robots" content="NOINDEX,NOFOLLOW"/> </head>
Did you get the solution?
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
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
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"/>
You can install this free extension: https://github.com/TidycodeIT/magento2-meta-robots
@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.