cancel
Showing results for 
Search instead for 
Did you mean: 

how to change the robots meta tag only in a static page

0 Kudos

how to change the robots meta tag only in a static page

Feature request from riswit, posted on GitHub Jan 22, 2016

After weeks of research, I feel here.

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

what is the equivalent of this code in magento 2?

< reference name="head"> < action method="setRobots">< value>NOINDEX,FOLLOW Thank you!!
5 Comments
apiuser
New Member
Status changed to: Investigating
 
apiuser
New Member

Comment from antboiko, posted on GitHub Jan 25, 2016

Hello @Riswit , you can include this < meta name="robots" content="NOINDEX,FOLLOW"/ > into the < head > < /head > section.

apiuser
New Member

Comment from riswit, posted on GitHub Jan 25, 2016

Hello @antboiko,

i have maked a static page, throught "Admin - Content - Pages". I want to set meta tag robots, only in this page.

if i try to set this code in "Design - Layout Update XML":

appears this error:

"Please correct the XML data and try again. Element 'head': This element is not expected. Expected is one of ( referenceContainer, container, update, move ). Line: 1"

What's a method equivalent to this code:

< reference name="head"> < action method="setRobots">< value>NOINDEX,FOLLOW it's possible in magento 2? thank you!!
apiuser
New Member

Comment from antboiko, posted on GitHub May 11, 2016

Hi @Riswit , we have internal ticket MAGETWO-52688 for this feature in our backlog.

Thanks, Anton.

kor3
New Contributor

Hi, did you get the solution? Smiley Happy