-
GSC sitemap Tips
Sitemap could not be read, X-Robots-Tag: noindex, how to modify it to index
-
Hello,
I apologize for the issue you are facing with your sitemap in Google Search Console (GSC). The error message "Sitemap could not be read" along with the "X-Robots-Tag: noindex" indicates that your sitemap is either not accessible or that the pages listed in it are set to noindex, which prevents them from being indexed by search engines.
Here are some steps you can take to resolve this issue:
1. Validate Your Sitemap
Make sure your sitemap is correctly configured. You can validate it using the Validate XML Sitemap tool. If there are any issues, they will be highlighted.
2. Check Sitemap Location
Ensure that your sitemap is located in the root folder of your WordPress installation. The URL should look like this:
https://rankmath.com/kb/indexed-though-blocked-by-robots-txt-error/
3. Ensure Posts Are Set to Index
If your posts are set to noindex, they will not appear in the sitemap. To change this:
- Go to Rank Math SEO → Titles & Meta.
- In the Robots Meta settings, enable the Index checkbox for your posts.
- Click Save Changes.
4. Check Robots.txt File
Make sure your
robots.txt
file does not block access to your sitemap or the pages listed in it. You can check this by going to Rank Math SEO → General Settings → robots.txt.5. Review X-Robots-Tag Header
If you have custom headers set for your pages, ensure that they do not include
noindex
. You may need to adjust these settings in your server configuration or through a plugin that manages headers.If you continue to experience issues after following these steps, please reply to this ticket with your site URL so we can assist you further. Additionally, if you would like comprehensive help with setting up Rank Math correctly, consider our professional setup service available at Rank Math Services. This service requires a PRO subscription and ensures your plugin setup adheres to the latest SEO standards.
Thank you for raising this concern!
Sources:
Troubleshooting the “Couldn’t Fetch” Error in Google Search Console » Rank Math
Rank Math Sitemap Issues and Their Fixes » Rank MathHello,
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.
The ticket ‘GSC sitemap tips Sitemap could not be read’ is closed to new replies.