How to change meta robots value

#269112
  • Resolved Laurie
    Rank Math free

    Hey Support Team,

    Is it possible to change the value of meta robots on the cart, checkout, my account pages. For these pages, I want to index in the Google. You guys can help on this issue.

    Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • Azib Yaqoob
    Rank Math business

    Hello,

    Thank you for contacting Rank Math today.

    Navigate to your robots.txt in Rank Math which is located under WordPress Dashboard > Rank Math > General Settings > Edit robots.txt as shown below:

    Hope that helps. Please don’t hesitate to contact us again if you need further help.

    ​​​​​​

    Laurie
    Rank Math free

    Azib Yaqoob – Please understand my question. I am taking taking about meta robots. For example: <meta name=”robots” content=”noindex, follow”/>. This code is coming on the cart page. I want to remove it or change the value from the noindex to index.

    For your reference: https://ibb.co/CVW7xs6

    Thanks,
    Garimak

    Hello,

    I am sorry for the confusion.

    Please note that it is done on purpose and your My Account, Cart, and Checkout pages SHOULD have noindex as they do not need to be included in the Index.

    This is nothing to be worried about.

    However, if you wish to modify these pages, you can make use of our filter to forcibly change the robots meta:
    https://rankmath.com/kb/filters-hooks-api-developer/#change-robots-meta

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Laurie
    Rank Math free

    Jeremy – That code is not helpful for us. It is not working:

    ************************************************************

    /**
    * Allows filtering of the robots meta data.
    *
    * @param array $robots The meta robots directives.
    */
    add_filter( ‘rank_math/frontend/robots’, function( $robots ) {
    return $robots;
    });

    *************************************************************

    Regards,
    Garimak

    Hello,

    The filter that my colleague provided needs to be customized to index those pages.

    You can check this similar ticket where my colleague shared a working filter to achieve that.

    I hope that helps.

    Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    Laurie
    Rank Math free

    Hi Reinelle,

    I checked that code, but it is also not working, Your team can handle this issue.

    Thanks

    Prabhat
    Rank Math agency

    Hello,

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.

    Please do take a complete backup of your website before sharing the information with us.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Laurie
    Rank Math free

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Hello,

    The code seems to be working now as you can see in my video screencast in the Sensitive Data section.

    Please clear your website and browser cache and try again. It should work on your end.

    Looking forward to helping you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 9 replies - 1 through 9 (of 9 total)

The ticket ‘How to change meta robots value’ is closed to new replies.