Hello,
Thank you for contacting us. We apologize for any inconvenience that may have been caused.
Please try to follow the steps below and see if that works for you.
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. If the above steps don’t seem to work, kindly apply the following filter to your site.
add_filter( 'rank_math/sitemap/enable_caching', '__return_false');
Here’s how you can add a filter/hook to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Once done, clear your website cache and check the sitemap again.
Meanwhile, you shouldn’t be worried about the “No: “noindex” detected in the HTTP header “X-Robots-Tag” error, as it’s completely fine and normal to have noindex
tag on your sitemap URLs.
Because, by default, sitemap URLs 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 section in the Search Console.
The reason is that we don’t want Google to index the sitemap itself; we only want Google to index the pages and posts that are listed on the sitemap. The sitemap is simply a way to inform Google about the pages and posts on your website, not a page that you want to appear in search results.
Let us know how it goes. We look forward to hearing from you.
Thank you.