I am trying to remove the

<meta name="robots" content="INDEX,FOLLOW"/>

Using Layout Update XML within Magento 2 Design Tab but i am keep getting the following error

Please correct the XML data and try again. Element 'head': This element is not expected. Line: 2

Here is the XML code i am using

<referenceContainer name="page.wrapper">
    <referenceContainer name="robots" remove="true"/>

Its not working. I want to remove this from within magento 2 backend using Layout Update XML option under design tab when customizing any page for specific staic page and then want to add my own using same Layout Update XML Option with

  • why you want to remove it ? – Pawan Jan 22 at 3:17
  • due to restricted access on server i cannot do changes from source. All i have is magento 2 admin access where for static page i want to remove the robots in header of specific page and want to add new one with NOINDEX, NOFOLLOW. – Mr.Devops Jan 22 at 8:57
  • you can also sen "NOINDEX,NOFOLLOW" from admin! – Pawan Jan 22 at 10:18
  • go to Content -> Design -> Configuration -> select "edit" for your theme go to Search Engine Robots -> Default Robots set "NOINDEX,NOFOLLOW" – Pawan Jan 22 at 10:18
  • @Pawan i know about changing NOINDEX, NOFLLOW from default robots set, but it will change globally, how to change for specific CMS page ? – Mr.Devops Jan 22 at 10:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.