google noindex

Should Sitemap XML be noindex?

Recently, I had a WordPress client who was worried because their XML sitemaps were set to noindex. They were using Yoast, and similar to other popular CMS platforms, XML sitemaps are typically set to noindex by default.

Screenshot from my site:

noindex xml sitemap

Short answer:  Yes, it is completely fine and even recommendable. It prevents the XML sitemap itself from appearing in search results, but it doesn’t prevent the URLs listed in it from getting indexed.

Further Details:

Google does index XML sitemaps (like any XML file). If Google is aware of a URL and it returns a valid response then it’s going to pass Google’s inclusion rules and could get indexed.

https://www.google.com/sitemap.xml (Actually, here you can discover interesting pages… of course, if you don’t have a better job to do ๐Ÿ˜€.)

All that reminded me of conversations related to the topic starting from as far back as 2008 when John Mueller discussed how you can remove them from indexing.

If you do want to have them removed from the index, you could have your server send a “x-robots-tag” HTTP header tag with the contents of the file. Since they all appear to be originating from a single script, I imagine adding this would be fairly easy. For more information on the “x-robots-tag”, please see our blog post.

The thing is that contrary to its content (the links themselves), the sitemap page itself is NOT supposed to be indexed – if it was, you would get a link to the sitemap when googling for content.

Later (2019), when different CMS plugins began implementing the recommended method to prevent these files from being indexed by Google (including adding an X-Robots-Tag HTTP response header when serving the XML sitemap – for example: X-Robots-Tag: noindex), a plugin was even created to prevent this. ๐Ÿ˜€

However, its creators were slapped in the face by the same John Mueller and ended up closing it. More information can be found in this article.

Just to back Joost up here — a sitemap file is not a web page (even though you can view them in a browser). A sitemap file doesn’t need to be indexed, it’ll work just fine like that. It’s cool to see folks dig into technical details, but in this case the noindex is irrelevant.

Conclusion

Reading just the short answer is more than enough ๐Ÿ˜€

Marin Popov

Marin Popov – SEO Consultant with over 15 years of experience in the digital marketing industry. SEO Expert with exceptional analytical skills for interpreting data and making strategic decisions. Proven track record of delivering exceptional results for clients across diverse industries.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *