The guide
A sitemap is a promise about your own site, and half its broken promises pass the schema
The sitemap protocol has only a few rules, but they live in a web page, two schema files and a dating note from 1998, and they do not agree with each other everywhere.
- 50,000 URLs most entries one sitemap or one index may list
- 52,428,800 bytes the 50 MB uncompressed limit, even for a gzipped file
- 2,048 characters the schema's longest loc; the page says less than that
- 0.0 to 1.0 priority, relative to your own pages only
- 150 of 300 planted faults that the published schema still accepts
Read the full guide Fold the guide
A sitemap is a list of addresses that a site hands to crawlers so they do not have to find every page by following links. It is an inclusion list. The robots.txt file says where crawlers should not go; the sitemap says where you would like them to look. That division of labour is the whole idea, and it explains both what a sitemap can do and what it cannot.
It cannot force anything. Nothing in the protocol obliges a crawler to fetch a listed page, index it, or treat it as important. The sponsors who published the protocol say plainly that each of them may use it, or not, in whole or in part. A sitemap is a promise you make about your own site: these pages exist, they live here, and this is when they last changed. Its value depends entirely on that promise being true.
Few rules, three documents
The format began as version 0.84 in June 2005, published by a single search company. In November 2006 three of the large search companies announced joint support, and the namespace moved to 0.9 without other changes. The rules have barely moved since. A sitemap is an XML file, encoded in UTF-8, whose root element is urlset in the namespace http://www.sitemaps.org/schemas/sitemap/0.9. Each page gets a url element, and each url holds exactly one loc. Three optional children follow in a fixed order: lastmod, changefreq and priority.
That sounds like one specification. It is really three documents that a careful checker must read side by side. The protocol page states the rules in prose. Two schema files, sitemap.xsd and siteindex.xsd, state them in XML Schema. The lastmod date points to a W3C Note from 1998 that defines a profile of ISO 8601. Where they overlap they mostly agree. Where they do not, the differences are small, specific and easy to trip over.
Take the length of a loc. The page says it must be less than 2,048 characters. The schema type tLoc allows anything from 12 to 2,048 characters, so a URL of exactly 2,048 passes the schema and breaks the page. The schema’s lower bound of 12 appears nowhere in the prose at all.
Or take the date. The W3C Note offers six levels of precision, from a bare year to a time with fractional seconds, and every level with a time must carry a zone designator: Z, or an offset such as +01:00. The schema instead accepts the XML Schema types date and dateTime. Those reject a year alone and a time without seconds, both valid in the Note, and they accept a time with no zone at all, which the Note forbids.
None of this is exotic. A generator that writes 2024-05-01T10:00 without seconds produces a valid W3C Datetime that a schema validator rejects. A generator that writes 2024-05-01T10:00:00 without a zone produces the reverse: the schema is happy, the Note is not, and the reader of the file cannot know which time zone was meant.
So the checker on this page keeps the two verdicts apart. Every finding says which rule it rests on, and whether a schema validator would also report it. To test that claim, 300 sitemaps and indexes were built with one planted fault each, plus 50 clean ones, and all 350 were run through xmllint with the two published schema files. The tool’s prediction of the schema verdict matched xmllint on all 350 files. The schema itself accepted 150 of 300 planted faults: relative addresses, times without zones, files with 50,001 URLs, addresses outside the sitemap’s own folder, duplicates and index children on another host. Schema validation is necessary, and it catches about half of what goes wrong.
Limits, indexes and dates that should be true
Each sitemap may list at most 50,000 URLs and may be no larger than 50 MB, which the protocol spells out as 52,428,800 bytes. Compression is allowed, but the limit applies to the file once uncompressed.
That detail matters when you check a file on your own computer. A gzip stream begins with the bytes 1F 8B, and its trailer records the original size only modulo 2 to the power 32, so the trailer cannot be trusted for a large file. The honest way to measure is to inflate the stream and count. Bytes that are not valid UTF-8 show up in the same pass, because the browser’s TextDecoder can be told to fail on them instead of guessing.
This tool inflates with the browser’s DecompressionStream as a stream and stops at 64 MiB, which is already past the limit, so a small file built to expand into a gigabyte stops with a message instead of filling memory. In the test, a 1,043,767 byte file that would have inflated to a gigabyte stopped at exactly 67,108,864 bytes.
Sites larger than one file use a sitemap index. Its root is sitemapindex, each child is a sitemap element with a loc and an optional lastmod, and the same limits apply: 50,000 children and 50 MB. An index may only list sitemaps on the same site as itself. The lastmod in an index means something different from the lastmod in a sitemap. It says when that sitemap file changed, so a crawler can skip files that have not changed since its last visit.
That gives a simple consistency check, and the tool’s built-in example shows it. Load the example and look at the first finding. The index sitemap-index.xml says that articles.xml changed on 2024-06-01. Open articles.xml beside it and the eighth article carries a lastmod of 2024-06-20T06:05:00+02:00. A page cannot have changed nineteen days after the file that lists it last changed, unless the index is stale. Neither file is wrong in isolation; only the pair is.
Truth is the real rule for lastmod. The protocol says it must be the date the page was last modified, not the date the sitemap was generated. One large crawler’s documentation adds that it ignores priority and changefreq entirely and uses lastmod only when it is consistently and verifiably accurate. A file that stamps every page with today’s date teaches readers to ignore the field. The lastmod histogram here exists to make that visible: a sitemap whose dates all fall on one day is telling you how it was built, not how its pages changed.
Priority and changefreq deserve less worry. Priority runs from 0.0 to 1.0, defaults to 0.5, and only ranks your own pages against each other, so setting everything to 1.0 says nothing. Changefreq takes one of seven words, from always to never, and the protocol calls it a hint, not a command.
Where a sitemap lives decides what it may list
The least known rule is the location rule. A sitemap at http://host/catalog/sitemap.xml may list only addresses that start with http://host/catalog/. Same protocol, same host, same port, same folder or below. The protocol’s own examples reject an https address in an http sitemap and an address in a sibling folder. Addresses that break the rule are dropped from further consideration.
A checker can only apply this rule if it knows where the file is served, and a file opened from disk does not say. So the tool asks. Type the address in the field under the editor, or open an index together with its children: when a child’s file name matches an entry in the index and you confirm the match, the index tells the tool where that child lives. In the example, pages.xml inherits https://www.demo-site.test/pages.xml from the index, and its one http address is reported as outside the sitemap’s location.
Addresses themselves must be absolute and escaped twice over. URL escaping follows RFC 3986, so a space becomes %20 and a lone percent sign becomes %25. Entity escaping follows XML, so an ampersand in a query string must be written as & inside the file. A raw ampersand is not a style problem; XML 1.0 makes it a well-formedness error, and a strict parser stops reading the file there. Non-ASCII addresses are allowed as IRIs under RFC 3987, which maps each character to its UTF-8 bytes written as percent escapes. Duplicates are found after the normalisation of RFC 3986 section 6.2.2: lowercase scheme and host, uppercase percent escapes, decoded unreserved characters, dot segments removed, and the default port dropped.
Extensions, return links and not trusting one reader
The protocol lets anyone extend a sitemap with elements in another namespace. Four extensions are common, and all four are documented by one crawler’s publisher rather than by the protocol. Images allow up to 1,000 image entries per page, each with an image location. Video entries need a thumbnail, a title, a description, and either a content location or a player location that differs from the page. News entries need a publication name and language, a publication date and a title, at most 1,000 per sitemap, and only for articles from the last two days. The tool checks these and labels every such finding as extension documentation, never as protocol, because a different reader may treat them differently.
Alternate language links are the subtle one. Each version of a page lists every version, itself included, with an xhtml:link carrying a language tag. The documentation is explicit that two pages must point at each other, or the links are ignored, so that a stranger cannot claim to be a translation of your page. A missing return link is invisible in any single file. The matrix on this page draws every pair: both ways, one way, or no link at all.
Language tags are checked against the grammar of RFC 5646, and the value x-default marks the fallback page. Note one trap. RFC 5646 allows es-419 for Latin American Spanish, while the same documentation says it supports only ISO 639-1 languages with ISO 3166-1 regions.
Finally, robots.txt. A Sitemap line holds the full address of a sitemap or index, may appear anywhere in the file and may repeat. RFC 9309 treats such lines as other records that crawlers may read, and lets crawlers accept common misspellings, which is exactly why you should not rely on one. Paste a robots.txt and the tool reads only those lines.
What this page cannot do is just as important. It never requests a URL. It cannot tell whether a listed page exists, redirects, returns an error or is blocked, and it cannot tell you what any crawler will actually do with your file. It can tell you, line by line, whether the promise is well formed and whether it agrees with itself.
Sources
Every source consulted for this guide. Links checked October 30, 2026.
- sitemaps.org - Protocol sitemaps.org (CC BY-SA 2.5)
- XML Schema for Sitemap files sitemaps.org
- XML Schema for Sitemap index files sitemaps.org
- Date and Time Formats W3C Note, Misha Wolf and Charles Wicksteed
- Extensible Markup Language (XML) 1.0 (Fifth Edition) W3C
- Namespaces in XML 1.0 (Third Edition) W3C
- Uniform Resource Identifier (URI): Generic Syntax (RFC 3986) IETF
- Internationalized Resource Identifiers (IRIs) (RFC 3987) IETF
- Tags for Identifying Languages (RFC 5646) IETF
- Robots Exclusion Protocol (RFC 9309) IETF
- Build and Submit a Sitemap Search Central documentation (CC BY 4.0)
- Image Sitemaps Search Central documentation (CC BY 4.0)
- Video Sitemaps and Examples Search Central documentation (CC BY 4.0)
- Create a News Sitemap Search Central documentation (CC BY 4.0)
- Localized Versions of your Pages Search Central documentation (CC BY 4.0)
- DecompressionStream - Web APIs MDN Web Docs (CC BY-SA)
- TextDecoder - Web APIs MDN Web Docs (CC BY-SA)
- Sitemaps - Wikipedia Wikipedia (CC BY-SA 4.0)
- XML - Wikipedia Wikipedia (CC BY-SA 4.0)
- gzip - Wikipedia Wikipedia (CC BY-SA 4.0)