NoIndex Error Google WebMaster

#17812
  • Resolved Cybergod
    Rank Math business

    Hi, Google Webmaster is throwing a noindex error for Woocommerce Cart/checkout/myaccount pages as well as all Product tags.

    I have checked all the Global Meta settings and Product Tag settings in rank math, I have noindex unchecked everywhere. How do I fix it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael Davis
    Rank Math pro

    Hello,

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

    These pages are normally set to noindex by default in the WooCommerce plugin but these settings had not taken effect in Rank Math.
    I have logged in and manually set the pages to noindex via the Rank Math metabox to remove them from the sitemap.
    You can now login to your search console and validate the fix.

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Cybergod
    Rank Math business

    Thanks, have you fixed the product tag no index issue too? I wish to index the product tags.

    Michael Davis
    Rank Math pro

    Hello,

    Thank you for contacting Rank Math today.

    I totally missed that before but I have added the following code to your functions.php file to fix this:

    /**
     * Filter Rank Math robots meta for tag pages
     *
     * @param array $robots The meta robots directives.
     */
    add_filter( 'rank_math/frontend/robots', function( $robots ) {
    	if(is_product_tag()){
    		$robots['index'] = "index";
    		$robots['follow'] = "follow";
    		return $robots;
    	}
    	return $robots;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​

    Cybergod
    Rank Math business

    Thanks

    Michael Davis
    Rank Math pro

    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/?rate=5#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 ‘NoIndex Error Google WebMaster’ is closed to new replies.