FIELD NOTES · SEARCH EVIDENCE

Check both sitemap budgets before approving a larger export

A smaller download can still exceed the export budget

An expanding shop exports a product sitemap and sends the reviewer a small gzip file. Another export puts many URL entries on one physical line. Neither the compressed file size nor the number of text lines answers the two relevant capacity questions. Retain the exact export, approved URL inventory and generator version before proposing a larger batch or splitting files.

The original shopping-site question below concerns a sitemap that keeps growing. Its older answers include superseded size figures. We use it only as demand evidence, then check current Google and protocol documentation. No claim about that shop’s indexing history, traffic or present implementation is needed to reproduce this local exercise.

Apply both limits to the correct objects

Google describes a per-file limit of 50,000 URLs and 50MB uncompressed. The sitemap protocol gives the byte equivalent as 52,428,800 and retains the uncompressed constraint when gzip is used. A file must satisfy both boundaries. The URL count and byte size can fail independently; compression reduces transfer bytes, not the expanded XML being checked.

This finite tool accepts an ordinary namespaced urlset and counts its direct url entries. Two repeated entries on one line still count as two entries, while distinctLocStrings is reported separately. An index supplied to this tool is rejected rather than counted as page URLs. Image, news and other extension-specific accounting, URL eligibility and full protocol validation remain outside its acceptance scope.

Reproduce the boundary and decompression cases

The supplied tests construct actual 50,000- and 50,001-entry XML files, rather than merely feeding claimed counts into a formula. They also construct a valid XML file exactly at the byte boundary, then add one byte and gzip the result. Even with a small stored file, the expanded read stops at limit plus one and returns UNCOMPRESSED_LIMIT_EXCEEDED. It does not finish expanding an oversized input to invent an exact total.

Six filled cases distinguish line counting, exact entry count, excess entries, oversized gzip expansion, malformed XML and an unsupported index. The large fixtures deliberately repeat a fictional URL and use a padding comment. They test capacity behaviour, not useful sitemap content. Passing those fixtures cannot justify publishing repeated entries or padding a real sitemap to its limit.

A partition needs preservation evidence as well

If either boundary fails, write a proposed partition manifest against the approved URL inventory. For each candidate child, record its version, entry count and expanded bytes. Compare the complete parsed URL inventory before and after, explicitly resolving duplicates, omissions and altered strings. Do not delete an old sitemap or change production discovery solely because a local counter failed. Such implementation needs its own authorised change and regression checks.

Run the command below with Python 3.10 or newer and keep the actual output. After a separately authorised implementation, verify published responses and related files, then review dated Search Console read evidence independently. WITHIN_TWO_LIMITS_ONLY says nothing about whether Google fetched, indexed or ranked the listed pages, and a partition is not a promised speed or ranking improvement.

python3 -B envelope_check.py sitemap supplied-sitemap.xml.gz

Six actual fixture outputs

Synthetic inputs; scroll on a narrow screen. Each result is scoped to the supplied file.

InputActual outputReview
Two URL entries on one lineWITHIN_TWO_LIMITS_ONLYCount url elements, not physical lines.
50,000 supplied entriesWITHIN_TWO_LIMITS_ONLYCount boundary passes even though duplicates still require a separate inventory review.
50,001 supplied entriesURL_LIMIT_EXCEEDEDThe URL-count boundary fails independently of byte size.
Small gzip, oversized expansionUNCOMPRESSED_LIMIT_EXCEEDEDRead stops at limit+1; exact full expanded size stays unknown.
Unclosed XMLUTF8_OR_XML_INVALIDDo not turn a size pass into XML validity.
An index supplied to a urlset toolUNSUPPORTED_ROOTReject unsupported input, rather than count child sitemaps as page URLs.

Sources and reproducible resources

Original historical question · Demand evidence only; replies are not current policy.

Supporting passages checked 6 November 2026. Case labels and workflow choices are our original teaching design.

README.txt · envelope_check.py · test_envelopes.py · filled-review.json

Continue with the related, separately scoped review.