When to merge and when to split
Merge when a site migration or a plugin change left you with several overlapping sitemaps, or when you want one clean file for a small site. Split when a file is near the limits (50,000 URLs or 50 MB uncompressed, from the sitemaps.org protocol), or when you want smaller files so Search Console’s sitemap report shows indexing by section. Both run entirely in your browser; files never leave your machine.
How the reader handles messy files
- Namespace prefixes.
<ns:urlset>,<ns:url>and extension prefixes like<image:image>are resolved by namespace, not by name. - Errors with line numbers. Mismatched or unclosed tags are reported, and the reader recovers where it can. Raw
&in URLs is invalid XML; we read it anyway, warn, and write it escaped. - Invalid values are dropped, not guessed. A lastmod that isn’t W3C Datetime, a changefreq outside always…never, or a priority outside 0.0–1.0 is removed and counted.
- Sitemap indexes are recognized and their child sitemaps listed. A DOCTYPE is skipped and its entities are never expanded.
Splitting, step by step
Choose the number of URLs per file (up to 50,000), the file name prefix and the folder URL where the files will live. We measure each file’s UTF-8 size as we go, so a file also closes before 50 MB. You get numbered files and a matching sitemap index. Upload them all to that folder, point robots.txt at the index and resubmit in Search Console. Google’s large sitemaps guide requires the listed sitemaps to sit in the index’s folder or below.
Related tools
Starting from a URL list instead of XML? Use the XML sitemap generator. To list files you already host, the sitemap index generator is quicker. Check the uploaded result with the sitemap checker. Adding a big batch of new URLs? A sitemap only helps discovery; it doesn’t fix thin pages, as we found when we published 2,500 posts in a month.