One sitemap file feels permanent right up until the site outgrows it. A shop that adds products every week, a publisher with years of articles, a directory with a page per town: each reaches that point. The URL list is long and the file is heavy. Regenerating the whole thing for the sake of twelve new pages is wasteful. The sitemap format has an answer built in for exactly this stage. Split the list across several files. Then join those files with a sitemap index.

This guide walks through that pattern using Ovatly's free XML Sitemap Generator, which builds each child sitemap from a plain list of URLs. The generator's own documentation names the approach directly: split larger sites into several files joined by a sitemap index.

Contents

  • Quick answer
  • Why one file stops being enough
  • What a sitemap index is
  • How to build the index, step by step
  • Worked example: 7,500 URLs in four child sitemaps
  • Keeping the set current
  • Limitations and honest expectations
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

Divide your URL list into chunks of at most 2,000 URLs. Run each chunk through the XML Sitemap Generator to produce one child sitemap per chunk, and upload the children to your site. Then write a sitemap index file. It is a <sitemapindex> document. Its <sitemap> entries each give one child file's location in a <loc> element. An optional <lastmod> date can be added. Upload the index to the root of your domain as your sitemap.xml. Reference it in robots.txt with a Sitemap line and in your search console accounts.

Why one file stops being enough

Two ceilings govern a single sitemap file. The protocol ceiling is generous: up to 50,000 URLs and 50 MB uncompressed per file. The working ceiling is lower for anyone building files with this generator, and it arrives first. The tool enforces a practical cap of 2,000 URLs per build. It tells you when it trims a longer list, rather than silently dropping the overflow.

That trim warning is the signal to change structure, not to fight the tool. A list of 7,500 URLs pasted in one go comes back as a 2,000-URL file plus a notice. The missing 5,500 pages are exactly the deep pages a sitemap exists for. Splitting the list deliberately keeps every chunk inside the cap. It also makes each file small enough to regenerate on its own when one section changes.

What a sitemap index is

A sitemap index is an XML file that lists sitemaps instead of pages. Its root element is <sitemapindex>. Each child file appears as a <sitemap> entry. The entry holds the child's address in a <loc> element. It can also hold a <lastmod> date recording when that child last changed. A minimal index for two children looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemap-1.xml</loc>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-2.xml</loc>
  </sitemap>
</sitemapindex>

Search engines read the index, follow it to each child, and treat the union of the children as your sitemap. The index is the only file you submit and reference; the children never need announcing. Note what the index does not contain: page URLs. Pages live in the children, in the usual <url> entries the generator produces. Putting a page address directly in the index is a structural error, not a shortcut.

How to build the index, step by step

  1. Assemble the full URL list for the site: canonical, indexable pages only, one full URL per line, protocol included.
  2. Split the list into chunks of at most 2,000 URLs each. Splitting along the site's own structure (posts, products, pages) makes later updates easier than splitting by raw count.
  3. For each chunk, open the XML Sitemap Generator and paste the chunk. You can choose a change frequency, a priority and a last-modified date for that chunk. Then check the skipped-lines report for rejected lines.
  4. Download each generated file under a clear name, for example sitemap-1.xml, sitemap-2.xml, and upload all of them to your site.
  5. Write the index file listing every child, with a <loc> for each and a <lastmod> only where the date is genuinely known.
  6. Upload the index to the root of your domain as sitemap.xml, and reference it in robots.txt with a Sitemap line and in your search console accounts.

Worked example: 7,500 URLs in four child sitemaps

Take a site with 7,500 canonical, indexable URLs to list. Against the protocol ceiling of 50,000 URLs per file, one file would be legal. Against the generator's cap of 2,000 URLs per build, one build is not possible. So the list splits into four chunks: 2,000, 2,000, 2,000 and 1,500 URLs.

Each chunk goes through the generator separately, producing sitemap-1.xml through sitemap-4.xml. Suppose the third chunk's list contains one line pasted as example.com/guides/pricing, without the protocol. The generator reports and skips that line. So sitemap-3.xml holds 1,999 entries, and the report names the line to fix. Correct the address and rebuild that one chunk. The set is whole again. The index then lists the four children, each in its own <sitemap> entry:

<sitemap>
  <loc>https://example.com/sitemap-3.xml</loc>
  <lastmod>2026-11-27</lastmod>
</sitemap>

The finished set is five files: four children carrying the 7,500 pages, and one index at the domain root tying them together.

Keeping the set current

The split structure pays for itself on update day. When one section of the site changes, regenerate only that section's child. Use its updated chunk of the list. Re-upload that one file. Then refresh the <lastmod> on its entry in the index. The other children stay untouched.

Two cautions keep this honest. A <lastmod> date is worth including only when it is accurate. Search engines use lastmod only when it is consistently accurate. A date bumped carelessly teaches them to ignore the field. The chunk boundaries deserve a note in your own records too. Six months later, nobody remembers whether the guides live in sitemap-2.xml or sitemap-3.xml.

Limitations and honest expectations

The generator builds the child files. The index itself is a short file. You write it by hand or with your site's tooling. It lists the children the generator produced. That division is deliberate. The index is a dozen lines of simple markup. The children are where the thousands of entries and the escaping rules live. Special characters in URLs are XML-escaped automatically inside the children, so an ampersand becomes the escaped form the format requires.

The larger expectations do not change with scale. A sitemap, indexed or not, helps discovery and crawling; it does not improve rankings and does not guarantee indexing. Optional values stay light: Google largely ignores priority and changefreq, and lastmod counts only when consistently accurate. Every child remains bound by the same protocol rules as any sitemap. Only full absolute URLs are allowed. No file can hold more than 50,000 URLs or 50 MB uncompressed. The 2,000-URL build cap keeps you far beneath those limits.

Common mistakes

  • Pasting the whole list into one build. Anything past the 2,000-URL cap is trimmed. The tool tells you, but only if you read the notice.
  • Putting page URLs in the index. The index lists sitemap files, never pages. Pages belong in the children.
  • Listing a child that was never uploaded. Every <loc> in the index must resolve to a real file on your site.
  • Hiding the index below the root. The index goes at the root of the domain it describes, like any sitemap file, and gets referenced in robots.txt and your search console accounts.
  • Padding the children with the wrong pages. Redirects, noindexed pages and duplicates do not belong in any child, however the list is split.
  • Guessing lastmod dates. An inaccurate date on an index entry is worse than no date at all.

FAQs

Where do I put the sitemap file? At the root of the domain it describes, for example https://example.com/sitemap.xml. Reference it in robots.txt with a Sitemap line and in your search console accounts.

Should every page be in the sitemap? List the canonical, indexable pages you want search engines to find. Leave out redirects, noindexed pages and duplicates; the sitemap is a discovery hint, not a guarantee of indexing.

Why was one of my URLs skipped? Entries must be complete absolute URLs starting with http:// or https://. Relative paths and bare domains without a protocol are reported and excluded so the file stays valid.

Does a sitemap improve rankings? No, it helps discovery and crawling of new or deep pages. Rankings depend on the pages themselves.

What happens if my URL list is longer than 2,000 lines? The tool enforces a practical cap of 2,000 URLs per build and tells you when it trims the list. Split the list into chunks of at most 2,000 URLs, generate one sitemap per chunk, and join the files with a sitemap index.

Conclusion

A sitemap index is how a sitemap grows up. The URL list splits into child files of at most 2,000 entries each. Every child is generated and checked the same way as a single small sitemap. One short index file at the domain root lists them all. The method is the same one that builds a first sitemap for a small site, which How to Create a Sitemap for a WordPress Site covers from the beginning. More guides in this series live in the SEO Tools guide archive.