I want to make noindex nofollow for login page, i tried

 <customer_account_login translate="label">
        <label>Customer Account Login Form</label>
        <!-- Mage_Customer -->
        <remove name="right"/>
        <remove name="left"/>
      <!--   <remove name="header"/>
        <remove name="footer"/> -->

        <reference name="root">
            <action method="setTemplate"><template>page/1column.phtml</template></action>
        <reference name="content">
            <block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
        <reference name="head">
            <action method="setRobots"><value>NOINDEX,NOFOLLOW</value></action>

But it is not working, can any one suggest how to make no index no follow for login page


2 Answers 2

  1. Create a layout XML file:

Inside the "layout" directory, create a file named "customer_account_login.xml". Add the following code to the "customer_account_login.xml" file:

<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <meta name="robots" content="noindex,nofollow" />
  1. Run Below Command and check
    php bin/magento setup:upgrade
    php bin/magento cache:clean

Override customer_account_login.xml File in your module or you can also override using custom theme

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.