Hello,
We apologize for the issue you are facing with your sitemap showing a noindex in the X-Robots-Tag. To resolve this, you will need to ensure that your sitemap is correctly configured and accessible. Here are some steps you can follow:
-
Check Your Sitemap: First, ensure that your sitemap is accessible. You can do this by visiting your sitemap URL directly in a browser. If it returns a 404 error or is not accessible, you may need to troubleshoot that issue.
-
Modify X-Robots-Tag: If your sitemap is accessible but still shows a noindex tag, you may need to modify the server settings or the .htaccess file to remove the noindex directive. This typically involves ensuring that the X-Robots-Tag for your sitemap is set to index, follow
instead of noindex
.
-
Resubmit Your Sitemap: After making changes, resubmit your sitemap in Google Search Console. You can refer to this tutorial on how to submit your sitemap to Google.
-
Check Caching: Sometimes, caching can cause issues with how your sitemap is displayed. Ensure that your sitemap is not being cached incorrectly. You can refer to our guide on how to exclude sitemaps from caching.
If you continue to experience issues after following these steps, please reply to this ticket with your site URL, and a human agent from our support team will assist you further.
Thank you for raising this concern!
Sources:
How to Fix Submitted URL Marked ‘NoIndex’ Error » Rank Math
Hello,
Please note that RankMath sets the “noindex” tag on your sitemaps by default. It’s done this way because a sitemap is only meant to guide search engines through your site, not to rank in search results.
The reason you’re seeing it set to “noindex” is to prevent it from appearing in search results, which is the desired behavior.
You should follow this guide to properly submit your sitemap:
https://rankmath.com/kb/submit-sitemap-to-google/
However, if you still wish to remove the noindex tag from your sitemap, you can use the filter on your 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/
Looking forward to helping 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.