How a sitemap index works
A sitemap index is a small XML file that lists your sitemap files instead of pages. You submit the index once (in Search Console and in robots.txt), and search engines fetch each sitemap it points to. The format is in the sitemaps.org protocol: a <sitemapindex> root with one <sitemap> per file, each holding a <loc> and an optional <lastmod>.
The rules we check
- Up to 50,000 sitemaps per index and 50 MB uncompressed, the same limits as a normal sitemap.
- Same site, same folder or lower. Google’s large sitemaps guide says referenced sitemaps must be hosted on the same site as the index unless cross-site submission is set up, and must sit in the same directory as the index or lower. An index at /sitemaps/index.xml can’t list /sitemap-blog.xml.
- Absolute, escaped URLs. Relative paths are rejected, fragments are removed and & is written as &.
- Duplicates are removed. If two lines list the same file with different dates, the newer lastmod is kept.
- File names. .xml and .xml.gz are the usual endings. A route like /sitemap/blog is fine if it serves XML, so that’s a note, not an error.
Point robots.txt at the index
Add the Sitemap: line the tool gives you to robots.txt. It must be the full URL. You can keep several Sitemap: lines, but one index is simpler to maintain. The robots.txt generator writes the rest of the file.
Building the files themselves
Need the sitemap files too? The XML sitemap generator builds them from a URL list and writes the index automatically when it has to split. To break up or combine sitemaps you already have, use the sitemap splitter and merger. Once everything is uploaded, run the index through the sitemap checker to confirm every file loads.