Sitemaps guide
How to split a large XML sitemap
Divide a sitemap before it crosses protocol limits, build a sitemap index, and choose boundaries that make failures and Search Console reports useful.
7 min read · Updated 2026-08-21
The short answer
Keep each sitemap below 50,000 URLs and 50 MB uncompressed, then list the child sitemap URLs in a sitemap index. Split by stable site section or content type when possible, because meaningful boundaries make count drops and indexing problems diagnosable.Split before the hard limit
The protocol limits apply to each sitemap file. Compression reduces transfer size but does not change the uncompressed 50 MB limit, and a sitemap index has its own 50,000-child limit.
Leave headroom. A file generated at exactly 50,000 URLs has nowhere to put the next page and turns normal growth into an incident.
Use stable, observable boundaries
A good split mirrors how the site is operated: products, articles, locations, videos, or languages. A purely numeric split is valid, but sitemap-004.xml tells you much less than products-eu.xml when one group suddenly loses half its URLs.
- Keep one canonical URL in one child sitemap.
- Keep child filenames stable as counts change.
- Do not mix sitemap and sitemap-index roots in one file.
- Expose child counts so sudden drops can be alerted on.
Build the index
The sitemap index lists absolute URLs to child sitemaps. Its optional lastmod describes the child sitemap file, not every page 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.xml</loc>
<lastmod>2026-08-20</lastmod>
</sitemap>
<sitemap>
<loc>https://example.com/sitemaps/articles.xml</loc>
<lastmod>2026-08-19</lastmod>
</sitemap>
</sitemapindex>Prove the fix
- Generate a child sitemapStart from one stable group of absolute URLs.
- Validate every fileCheck both the index and each child before submission.
- Read the sitemap index rulesCardinality, namespace, and child requirements.
Related guides
- How to fix “Sitemap could not be read”A deterministic checklist for separating fetch failures, HTTP problems, malformed XML, namespace mistakes, and invalid sitemap entries.
- How to use sitemap lastmod correctlyWhat <lastmod> should measure, which date forms are valid, when to omit it, and why stamping every URL on every deploy destroys the signal.
Get started
Bring order to the XML your team can't afford to ignore.
Create a free account and get a private workspace to search, validate, diff, and monitor your XML feeds, sitemaps, schemas, and vendor integrations.