Hello,
We apologize for the issue you are facing with the noindex tags in your sitemap while using the Rank Math SEO plugin. To address this, we recommend checking a few things:
-
Check Rank Math Settings: Ensure that the settings in Rank Math are configured correctly. You can navigate to Rank Math SEO → Sitemap Settings and verify that the options for including posts and pages in the sitemap are enabled.
-
X-Robots-Tag: Since you mentioned not finding the x-robots tag in your .htaccess file, it’s possible that it might be set elsewhere or through another plugin. Please check if any other SEO plugins or server settings might be adding this tag.
-
Custom Canonicals: If you have set custom canonical URLs for your posts, they may not appear in the sitemap. Ensure that you are using the default canonical settings unless necessary.
If you would like us to assist you further with this issue, please reply to this ticket, and a human agent from our support team will take over and help resolve it.
Thank you for bringing this concern to our attention!
Sources:
Rank Math Sitemap Issues and Their Fixes » Rank Math
Hello,
Please note that the sitemaps are by default set to Noindex as they are meant to be crawled and not to be displayed on search results pages.
You should only submit your sitemap to the sitemap section of your GSC account and shouldn’t use the URL inspection tool for the sitemap URLs.
https://rankmath.com/kb/submit-sitemap-to-google/
In case you still want to index your sitemap, you can use the following filter on your website:
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/
After applying the filter, please clear your sitemap cache by following this screencast: https://i.rankmath.com/pipRDp
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.