A sitemap file feels like it should hold as much as you can paste into it. It cannot. The sitemap protocol sets two hard limits on every file: no more than 50,000 URLs, and no more than 50 MB in size. Most sites never come near either figure, but a growing store or a large archive can reach them faster than expected, and a file that breaks the limits risks being rejected or only partly read.
This guide explains both limits, the easily missed word "uncompressed" in the size limit, and how Ovatly's free XML Sitemap Generator handles them in practice, including its own lower cap of 2,000 URLs per build. For the companion question of what belongs in the list at all, see Which Pages Should Not Be in Your Sitemap?.
Contents
- Quick answer
- The two limits, and why there are two
- What "50 MB uncompressed" actually means
- Which limit will you hit first?
- The generator's own cap: 2,000 URLs per build
- How to check your list size with the generator, step by step
- Worked example: a list that needs splitting
- When you outgrow one file: the sitemap index
- Limitations and honest expectations
- Common mistakes
- FAQs
- Conclusion
Quick answer
A single sitemap file may contain up to 50,000 URLs and must not exceed 50 MB uncompressed. The size is measured before compression, so a compressed file still counts at its full size. Ovatly's XML Sitemap Generator enforces a practical cap of 2,000 URLs per build and tells you when it trims the list. If your site needs more room, split the URLs across several files, each inside both limits, and join them with a sitemap index.
The two limits, and why there are two
The count and the size are separate limits because they guard against different problems: too many entries to parse in one file, and too large a file to fetch and process, often repeatedly. You must satisfy both at once. A file with 40,000 URLs that weighs 55 MB uncompressed breaks the rules; so does a lean 10 MB file listing 60,000 entries. Whichever limit you reach first forces you to split.
What "50 MB uncompressed" actually means
The word that matters most in the size limit is "uncompressed". Sitemaps are often served compressed, because XML text compresses extremely well: a 40 MB sitemap might travel as a 3 MB download. That is good practice for transfer speed, but it does not change which side of the limit you are on: the protocol measures the plain XML text, before any compression. So check the size of the raw sitemap.xml on disk. If it is over 50 MB, it is over the limit, however small it becomes in transit.
Which limit will you hit first?
For most sites, the URL count arrives first. A plain entry with a <loc> and a <lastmod> is a few hundred bytes of XML, so 50,000 entries typically produce a file well under 50 MB. The size limit binds first only when entries carry long URLs or heavy extra markup. Watch both numbers as a site grows: the count is the number of <url> entries, the weight is the file size of the uncompressed XML. Neither requires a guess.
The generator's own cap: 2,000 URLs per build
Ovatly's generator stops well short of the protocol ceiling. It enforces a practical cap of 2,000 URLs per build, which keeps the tool fast in your browser and the output easy to inspect. When a pasted list runs past the cap, the tool trims it and tells you, so you know exactly how many URLs still need a home in another file. Treat the cap as a workflow, not a wall: a site with 7,500 URLs becomes four builds of under 2,000, saved as four files joined by a sitemap index, each comfortably inside both the tool cap and the protocol limits.
How to check your list size with the generator, step by step
- Open the XML Sitemap Generator and paste your URLs, one full URL per line, including
https://. - Optionally choose a change frequency, a priority and a last-modified date to apply to every URL in the build.
- Check the skipped-lines report if any URL was rejected. Entries must be complete absolute URLs starting with
http://orhttps://; relative paths and bare domains are reported and excluded so the file stays valid. - Read the result before you download. If the tool reports a trim at 2,000 URLs, note how many lines remain and plan the next build for them.
- Copy or download the generated sitemap.xml and upload it to your site root.
Worked example: a list that needs splitting
Say you export the URLs of a store with 7,500 product and category pages and paste them into the generator, with change frequency "weekly" and priority "0.8" selected. The tool builds the first 2,000 entries as a <urlset> where each page appears as a <url> block with its <loc> plus the chosen <changefreq> and <priority> values, and reports that the list was trimmed. You save that file, repeat the build with the next 2,000 lines, and so on: four files in total.
Each file is far inside the protocol limits: 2,000 entries is 4 percent of the 50,000 allowance, and nowhere near 50 MB uncompressed. The four files are then listed in a sitemap index, the file you reference at your site root, for example at https://example.com/sitemap.xml, and in robots.txt with a Sitemap line and in your search console accounts. One detail worth copying: a pasted line like "example.com/about", without the protocol, is reported and skipped rather than written into the file, which protects the whole build from one malformed entry.
When you outgrow one file: the sitemap index
Splitting is not a workaround; it is the structure the protocol expects for large sites. A sitemap index is a small file that lists other sitemap files instead of pages. Host the index at the root of the domain it describes and point search engines at it; they follow it to each child file. Separate files per section, such as one for products and one for articles, also make it obvious later which part of a site is being read and which is not.
Limitations and honest expectations
The limits are about the file, not about results. A sitemap inside both limits is a valid discovery hint; it is not a guarantee of indexing, and a sitemap does not improve rankings. Rankings depend on the pages themselves.
Two optional fields deserve the same honesty. Google largely ignores priority and changefreq, and lastmod is used only when consistently accurate. Fill them in if true, but do not expect them to steer crawling.
Finally, the generator works on the list you paste. It counts and trims that list and escapes special characters automatically (for example & becomes &), but it cannot know whether a URL still exists on your site. Checking that the listed pages are live and canonical is a separate job, covered in the SEO Tools guides.
Common mistakes
- Judging the size by the compressed file. The 50 MB limit is uncompressed. Check the raw XML.
- Watching only the URL count. A file can break the size limit before it reaches 50,000 entries, and the count limit before it gets heavy. Both apply at once.
- Assuming a trimmed list was fully built. When the generator reports a trim at 2,000 URLs, the remaining lines are not in the file. Build them as another file.
- Cramming one giant file instead of splitting. Several files joined by an index are the intended structure, and each stays easy to check.
- Expecting the limits to affect rankings. Staying inside them keeps the file valid, nothing more.
FAQs
How many URLs can one sitemap file hold? The sitemap protocol allows up to 50,000 URLs and 50 MB uncompressed per file. This tool enforces a practical cap of 2,000 URLs per build and tells you when it trims the list; split larger sites into several files joined by a sitemap index.
What does 50 MB uncompressed mean? The size limit is measured on the file before any compression is applied. A sitemap that compresses down to a few megabytes still counts at its full uncompressed size, so compression does not raise the limit.
Why did the tool stop at 2,000 URLs? That is the generator's practical cap per build, well below the protocol limit. When a pasted list is longer, the tool trims it and tells you, so you can build the remaining URLs as a second file instead of losing them silently.
What do I do if my site has more than 50,000 URLs? Split the list into several sitemap files, each inside both limits, and join them with a sitemap index file that lists the individual sitemaps. The protocol is designed for that structure.
Does a bigger sitemap improve rankings? No, it helps discovery and crawling of new or deep pages. Rankings depend on the pages themselves.
Conclusion
Keep both numbers in view: 50,000 URLs per file, 50 MB uncompressed per file, and 2,000 URLs per build in Ovatly's XML Sitemap Generator, with every trim reported. Inside those limits, a sitemap does its one job well: it hands search engines a clean list of the pages you want found. When the list outgrows one file, split it and let an index hold the pieces together.