My Sitemap with noindex

#603968
  • Resolved Anonymous
    Rank Math free

    https://appysa.com/sitemap_index.xml

    Here is my sitemap url, when I checked with screaming frog, it shows issues that the sitemap is not indexed. When I see in the search console it show the sitemap is reading successful a day before.

    How to make it indexable permanent

Viewing 1 replies (of 1 total)
  • Hello,

    Thanks for contacting us, and sorry for any inconvenience that might have been caused due to that.

    You shouldn’t be worried about that, as it’s completely fine and absolutely normal to have noindex tag on your sitemap URLs. The sitemaps, by default, are set to noindex as it is not meant to be indexed and appear in the search results.

    The sitemap should only be submitted in the sitemaps sections in the Search Console.

    However, if you still wish to remove noindex tag from your sitemap, you may add the following filter to your WordPress site:

    add_filter( 'rank_math/sitemap/http_headers', function( $headers ) {
    	if ( '/sitemap_index.xml' !== $_SERVER['REQUEST_URI'] ) {
    		return $headers;
    	}
    	unset( $headers['X-Robots-Tag'] );
    	return $headers;
    } );

    Here’s how you can add a filter/hook to your WordPress site:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Let us know how it goes. Looking forward to helping you.

    Thank 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 1 replies (of 1 total)

The ticket ‘My Sitemap with noindex’ is closed to new replies.