No: ‘noindex’ detected in ‘X-Robots-Tag’ http header

#472064
  • Resolved Sandeep Raj Ayaan
    Rank Math free

    My sitemap pages are not getting indexed, I am facing issue with the error- No: ‘noindex’ detected in ‘X-Robots-Tag’ http header, how to resolve it?

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

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

    Please note that the noindex tag is added to the sitemaps on purpose, and you shouldn’t change that. It is added so that the sitemap itself doesn’t get included in the Google search index.

    The sitemaps are intended to be crawled by the search engines but not get indexed on the SERPs.

    Can you please follow these steps?
    1. Flush the Sitemap cache by following this video screencast:
    https://i.rankmath.com/pipRDp

    2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
    https://rankmath.com/kb/exclude-sitemaps-from-caching/

    3. Remove all your sitemaps from GSC and re-submit only the sitemap_index.xml URL.

    That should fix the issue. Please let me know if that does not. We are here to assist.

    I did the same but nothing happened, it’s still like before. same error is shown.

    Hello,

    Can you please confirm if you want your sitemap URLs (sitemap_index.xml) to have index tag?

    If yes, then you shouldn’t be worried about that, as it’s completely fine and absolutely normal to have noindex tag on your sitemap URLs. As my colleague mentioned above, 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.

    If you’re mentioning about posts/pages of your website that are being noindexed, please share the affected URLs with us, so that we can investigate the issue further for you.

    Looking forward to helping you.

    Thank you.

    Okay,Thanks for the support, my issue has been resolved.

    Hello,

    We’re glad that we could address your concern.

    Please feel free to reach out to us again in case you need any other assistance.

    We are here to help.

    Thank you.

    Hello,

    I also got the same problem what should I do next?

    How did you solve that problem?
    Can you help me to solve that problem I also get noindex tag on my sitemap.xml page.

    Hello @diwansachidu4,

    As mentioned above, sitemap URLs are not meant to be indexed on SERPs. Hence we recommend to keep your sitemap with noindex tag. And instead of submitting sitemap in URL Inspection Tool, you should submit sitemap URL only in the sitemap section of GSC.

    However, if you still wish to remover 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 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 8 replies - 1 through 8 (of 8 total)

The ticket ‘No: ‘noindex’ detected in ‘X-Robots-Tag’ http header’ is closed to new replies.