XML sitemap limits and index files for large sites
A sitemap does not get a page indexed. It gets it discovered. On a site of tens of thousands of URLs that is not a small thing: it is the only mechanism guaranteeing a newly generated page is seen at all.
The official limits
| Constraint | Value |
|---|---|
| URLs per sitemap file | 50,000 maximum |
| File size, uncompressed | 50 MB maximum |
| Compression | gzip accepted; the 50 MB limit applies to the uncompressed file |
| Sitemaps per index file | 50,000 |
The size limit is usually hit before the URL count once URLs are long or extensions are in use. Chunking logic must therefore watch both bounds, not just the counter.
Sitemap index structure
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap>
<loc>https://example.com/sitemap-blog-1.xml</loc>
<lastmod>2026-08-19</lastmod>
</sitemap>
</sitemapindex>
Only the index URL goes in robots.txt and gets submitted in Search Console. Child files are discovered from there.
Segment by pattern, not by insertion order
Slicing mechanically into 50,000-URL chunks by creation order is the simplest option and the least useful one. Thematic segmentation turns the sitemap into a diagnostic instrument.
sitemap-guides.xml— pillars and editorial pagessitemap-comparisons.xml— one programmatic patternsitemap-alternatives.xml— another pattern
Search Console reports indexation coverage per sitemap. Segmenting by pattern tells you which batch is failing instead of leaving you with an uninterpretable global rate.
Tags that matter, and tags that do not
| Tag | Status | Usage |
|---|---|---|
<loc> | Required | Absolute, encoded, canonical URL |
<lastmod> | Used | Only when accurate and verifiable |
<changefreq> | Ignored by Google | None |
<priority> | Ignored by Google | None |
On lastmod, Google's guidance is explicit: the value is used only when it is consistently and verifiably accurate. Bumping it on every deploy without a real content change destroys the signal's credibility across the whole site.
Five content rules
- Canonical URLs only. A URL listed in the sitemap while canonicalising elsewhere sends contradictory signals.
- 200 responses only. No 301s, 404s or 410s.
- Indexable URLs only. A
noindexpage in a sitemap is a straight contradiction. - One protocol, one host. No mixing http and https, or www and non-www.
- Regenerate after every wave. A stale sitemap delays discovery of new pages by weeks.
The sitemap as an operating tool
The most effective practice on a programmatic project is to isolate each publication wave in its own temporary sitemap. That wave's indexation rate can then be read directly instead of being diluted in historical data. Once it stabilises, the URLs move into the relevant thematic sitemap.
For pushing changes faster than the next crawl, see IndexNow on large sites; for why discovery is not the same as indexation, see crawl budget.
Frequently asked questions
How many URLs can a sitemap contain?
A single sitemap file is capped at 50,000 URLs and 50 MB uncompressed. Beyond that, use multiple files grouped under a sitemap index.
Should I set changefreq and priority?
No. Google ignores both. Only loc and, when accurate, lastmod are used.
Does a sitemap guarantee indexation?
No. It helps URLs get discovered. Whether they are indexed depends on perceived page quality, internal linking and the crawl budget allocated to the site.