I am having trouble in putting meta robots
in selective page. I wanted to Noindex
and Follow
on login and registration page only and rest of page will have Index
and Follow
.
I have put <meta name="robots" content="NOINDEX,FOLLOW"/>
in /vendor/magento/module-customer/view/frontend/layout/default.xml
file but it causes to appear on whole site.
The block I have put in above file for reference.
// Path- /vendor/magento/module-customer/view/frontend/layout/default.xml
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<head>
<meta name="robots" content="INDEX,FOLLOW"/>
</head>
<body>
...
</body>
</page>
Is there any way so I can put some condition here or any other best way to do it.
I am using Magento ver.2.2.6
Thanks