Sitemap index troubleshooting

Sitemap index errors

A sitemap index is a directory of sitemap files. Its job is to give crawlers one location from which they can discover several URL sitemaps. Errors in the index can hide an otherwise healthy group of child files, so inspect the index structure before troubleshooting every listed sitemap.

Check the submitted index document

CorrectSitemap checks the sitemapindex root, standard namespace, sitemap entries, required absolute HTTP(S) locations, optional modification dates, element order, and bounded entry count. It does not request the child sitemap URLs.

Validate sitemap index XML

A valid sitemap index example

Each sitemap entry contains one loc and may contain one lastmod. The date describes the child sitemap file's modification time, rather than the modification time of every page listed inside it.

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemaps/products-1.xml.gz</loc>
    <lastmod>2026-08-12T14:30:00Z</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemaps/articles.xml</loc>
  </sitemap>
</sitemapindex>

Do not mix index entries with URL entries

A URL sitemap uses urlset as its root and repeats url entries that point to pages. An index uses sitemapindex and repeats sitemap entries that point to sitemap files. Copying a url block into an index, or placing sitemap children under urlset, produces an unexpected core element.

This distinction matters when a generator changes modes based on dataset size. Test both branches: a small site may emit a direct urlset, while a larger production dataset may split output and emit an index.

Every child location must be usable

Each sitemap entry requires one non-empty loc. CorrectSitemap accepts structurally valid absolute HTTP and HTTPS values. Relative paths such as /sitemaps/products.xml, scheme-less values such as example.com/sitemap.xml, and local filesystem paths should be replaced with complete public URLs.

The general sitemap protocol says an index may list sitemap files on the same site as the index. Google documents cross-site submission options for verified properties and robots.txt authorization, which add an ownership layer beyond XML syntax. CorrectSitemap does not know where the pasted index is deployed and therefore does not decide whether two hosts satisfy those operational rules.

Escaping applies to index locations too. If a child sitemap URL has a query string with multiple parameters, serialize each literal ampersand as &amp; in the XML source.

Use lastmod for the child file

The optional index-level lastmod can help a crawler decide which child sitemap files deserve another fetch. Set it when the corresponding child sitemap changes. Copying the newest page date into every index entry can create noisy updates and reduce trust in the signal.

Supported values include a calendar date such as 2026-08-12 and a W3C date-time such as 2026-08-12T14:30:00+00:00. Impossible dates, incomplete timestamps, and date-times without a timezone fail the validator's structural check.

Duplicate and out-of-order children

Within one sitemap entry, loc comes before optional lastmod. A second loc or lastmod is reported as a duplicate core child. These problems commonly arise when:

Repair the data structure feeding the serializer. Text-level cleanup at the end of a pipeline is fragile and can create new encoding or closing-tag errors.

Split large inventories deliberately

The sitemap protocol allows up to 50,000 sitemap entries in one index and an uncompressed file size up to 50 MB. Individual child sitemaps have the same 50,000-URL and 50 MB uncompressed ceilings. Several smaller indexes may be used when an inventory grows beyond one index.

CorrectSitemap accepts at most 5 MiB per request and stops after 50,000 entries, with additional bounded parser limits. A resource-limit diagnostic sets analysisComplete to false and suppresses partial aggregates. Validate representative generated partitions when the complete production index exceeds the tool's request ceiling.

Choose partitions that are easy to operate

Group child sitemaps along stable boundaries that your publishing system already understands, such as product families, article archives, locales, or bounded numeric batches. Stable filenames make deployment logs and Search Console reports easier to compare over time. Avoid creating a new child file for every small update or reshuffling every URL on each run; either pattern can cause needless crawler work and makes failures harder to isolate.

Keep an inventory of the expected child files and compare it with every generated index. That catches a missing partition even when the index XML itself is perfectly valid.

What this validator can establish

The submitted index can be checked for well-formed XML, correct root and namespace, expected child structure, usable location shapes, valid dates, and safe resource bounds. The response includes aggregate entry counts and static diagnostics without returning the submitted URLs.

Several production conditions still need direct testing:

A reliable troubleshooting workflow

  1. Validate the index XML supplied by the generator.
  2. Correct root, namespace, entry, location, date, and ordering errors at the generator.
  3. Request the deployed index URL and compare its bytes with the local output.
  4. Sample child locations from different partitions and check their HTTP responses.
  5. Validate at least one child from every generator profile or content family.
  6. Submit the index in Search Console and monitor its retrieval and processing status.

If Search Console can fetch the index but reports errors in a child sitemap, move the investigation to that child file. If it cannot retrieve the index at all, inspect DNS, TLS, HTTP status, redirects, robots/CDN rules, and server logs before changing otherwise valid XML.

Protocol references

The Sitemaps protocol index section defines the index elements, limits, and lastmod meaning. Google documents size, location, cross-submission, and Search Console considerations in its sitemap construction and submission guide.

Working with other structured formats?

Check calendar files with CorrectICS, contact files with CorrectVCF, feeds with CorrectFeed, Content-Type values with CorrectMIME, or browse CorrectFormats.