How to Create a Sitemap Index File (sitemap_index.xml)
To create a sitemap index, list your child sitemap URLs one per line in a sitemap index generator, add an optional last-modified date, then copy or download the resulting sitemap_index.xml and submit that single file to Google Search Console. The index is a small XML file that references all your other sitemaps, so search engines can discover every one of them from a single entry point.
This tutorial walks through the whole process with the ByteTools Sitemap Index Generator, explains the file's structure, and shows how to submit it. Everything is generated in your browser — no crawling and no uploads.
What a sitemap index file is
A sitemap index uses the <sitemapindex> element and lists the URLs of your sitemaps, not your pages. Instead of one giant sitemap, large sites split their URLs across several files and tie them together with an index. Each entry points at a child sitemap and can carry a <lastmod> date indicating when that child sitemap last changed. The result looks like this in outline:
<sitemapindex xmlns="...">
<sitemap>
<loc>https://example.com/sitemap-posts.xml</loc>
<lastmod>2026-07-01</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemap-products.xml</loc>
</sitemap>
</sitemapindex>Step-by-step: build sitemap_index.xml
- Paste your child sitemap URLs. Enter one full sitemap URL per line — for example your posts, products and categories sitemaps.
- Set an optional lastmod date. Apply a shared last-modified date to every entry if your sitemaps were regenerated together.
- Fix flagged URLs. The tool validates each line and highlights anything that isn't a valid URL — correct typos or missing protocols.
- Copy or download. Grab the generated XML or download it as sitemap_index.xml.
- Upload and submit. Place the file at your site root and submit its URL in Google Search Console.
The special characters in your URLs are escaped automatically, so the file passes XML validators cleanly.
How to submit it to search engines
Submit only the index URL — for example https://example.com/sitemap_index.xml — in Search Console. Google reads the index, discovers every child sitemap inside, and crawls them all; you do not submit each child separately. It is also good practice to reference the index in your robots.txt with a Sitemap: line so other crawlers find it too.
Privacy and how it runs
The generator builds the file entirely in your browser from the URLs you paste. It does not crawl your site, fetch your sitemaps, or upload anything to a server, which makes it safe for staging domains and pre-launch sites. Once loaded it works offline as well, so you can prepare a sitemap index without an internet connection.
Try the Sitemap Index Generator — free and 100% in your browser.
FAQ
Do I put page URLs or sitemap URLs in the index?
Sitemap URLs. A sitemap index references your other sitemap files, not individual pages. Each <loc> should be the address of a child sitemap like sitemap-posts.xml, and those child files contain the actual page URLs.
Where should sitemap_index.xml live on my site?
Place it at your site root, for example https://example.com/sitemap_index.xml, so it sits alongside the child sitemaps it references. Then submit that root URL in Search Console and list it in robots.txt.
Is the lastmod date required in a sitemap index?
No, lastmod is optional. When included, it should reflect when the referenced child sitemap itself last changed, which helps search engines decide which children to recrawl. Leave it off if you cannot keep it accurate.
Can I add more child sitemaps later?
Yes. Paste your full list of sitemap URLs again, including the new ones, regenerate the file, and re-upload it. Google will pick up the added child sitemaps the next time it reads the index.
Related free tools
- XML Sitemap Generator — build the child sitemaps this index references.
- Robots.txt Generator — add the Sitemap: line pointing to your index.
- RSS Feed Generator — give crawlers a fresh-content feed.
- XML Formatter — tidy and validate the generated XML.
Built by ByteVancer
ByteTools is a free product of ByteVancer, a software and web development studio building web apps, SaaS and custom software. If you manage a large or complex site that needs proper technical SEO and automated sitemaps, explore how ByteVancer can build it for you.
Recommended reading
Sitemap Index Best Practices and Mistakes to Avoid
Pro tips for sitemap index files — respect the 50,000 URL limit, keep lastmod accurate, avoid nesting indexes and fix the errors that break your XML.
Sitemap Index Use Cases: When Large Sites Need One
Real scenarios where a sitemap index earns its place — ecommerce catalogues, multilingual sites, news publishers and migrations, with worked examples.
Yes or No Generator: Real Use Cases and Examples
From beating decision paralysis to games and classrooms, see real use cases and examples for a random yes or no generator.
Yes or No Generator Tips and Common Mistakes
Get better decisions from a random yes or no generator. Pro tips, when to add Maybe, and the common mistakes to avoid when picking answers.