XML sitemaps · Sitemap files

Invalid sitemap XML or index structure

This page is listed only in a sitemap reached through a sitemap index nested inside another index, which the sitemap protocol does not allow.

How this page is built

robots.txt points to /sitemaps/nested-index.xml. That is a sitemap index, and the only thing it lists is /sitemaps/nested-index-child.xml, which is another sitemap index. The second index lists /sitemaps/nested-index-urls.xml, the sitemap that holds this page.

The page is left out of /sitemap.xml, so the nested sitemap is the only sitemap it appears in. A crawl tool that refuses the nested index will also report this page as not in any sitemap, which is the same fault seen from the page.

Why it matters

Sitemap indexes can list sitemaps, but not other sitemap indexes. Search engines stop at the second level, so every URL below a nested index is never read. Other structural errors have the same effect: malformed XML, a wrong namespace, or a sitemap that does not start with the XML declaration.

Because the sitemap fails quietly, the problem often goes unnoticed until someone asks why a group of pages is not indexed.

How to check it

Submit the sitemap in Search Console and look at its status: nested indexes and parsing errors are reported there. Crawl tools that read sitemaps report files they cannot parse. Opening the file in a browser shows XML errors straight away.

How to fix it

Keep to two levels at most: one sitemap index that lists sitemaps of URLs. Make each file valid XML with the standard namespace, and test it after every change to the code that builds it.

Back to all tests