how to remove robots noindex

#388189
  • Resolved Bud Kraus
    Rank Math pro
    Content AI Starter

    Hi

    I need to remove <meta name=”robots” content=”noindex, follow”/> on this page:

    https://joyofwpstage.wpengine.com/watch-free-wordpress-videos/

    This is a checkout page that was created with CartFlows and Elementor but it is your plugin that inserts this:

    <meta name=”robots” content=”follow, noindex”/>

    I have already set Settings > Reading not to discourage indexing.

    if you have a PHP snippet that can remove this I’d appreciate having it. I could not remove this with your UI using Title and Meta settyings.

    Thanks.

    Bud

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Thank you for contacting Rank Math support, and sorry for any inconvenience that might have been caused due to that.

    The robots meta tags are an integral part of our plugin and can’t be removed completely from the HTML with any filter.

    This tag is added as part of our action rank_math/head that is used to generate all the meta tags inside the header.

    However, you can unset the attribute value by using this filter:

    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	return [];
    });

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

    Bud Kraus
    Rank Math pro
    Content AI Starter

    Thank you for your speedy reply!
    Your snippet worked but it also removed the “index” value from the robots meta tag and not just noindex. The pages I’ve looked at show this:
    <meta name=”robots” content=”max-snippet:-1, max-video-preview:-1, max-image-preview:large”/>

    As I correct to assume that “index” is basically default even if not explicitly stated. I did a URL inspection with Google Search and pages that have the above meta robots tag can be indexed.

    Thanks again.

    Bud

    Prabhat
    Rank Math agency

    Hello,

    Though it should not have issues if the index tag is not present, you can modify the filter a bit to add it. You can try using the below filter and see if that helps:

    add_filter( 'rank_math/frontend/robots', function( $robots ) {
      if(is_checkout()){
    	  $robots["index"] = 'index';
      }
      return $robots;
    });

    Let us know how that goes.

    Thank you.

    Bud Kraus
    Rank Math pro
    Content AI Starter

    Thank you so much!

    That’s just what I need as the script applies only to the checkout page!

    Love it!

    Bud

    Hello,

    We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘how to remove robots noindex’ is closed to new replies.