The viewer lists every rule below that a file breaks, with its line and column, and still shows the file. It never refuses one. The sources are the sitemaps.org protocol page, its two schemas, Google’s pages and Google’s three extension schemas, all fetched as raw files and read in full (see Elements and Extensions for the exact pages and dates). A rule marked “viewer” is the viewer’s own choice, not stated by a source.
Limits
- At most 50,000 addresses in a sitemap, and 50,000 sitemaps in an index.
- At most 50 MB (52,428,800 bytes) for a file, uncompressed. Gzip is allowed, but the unpacked file must still fit.
- The protocol states these limits and does not say what a crawler does with a file or list past them.
- An address has fewer than 2,048 characters in the protocol text; the schema allows 12 to 2,048 characters inclusive. The viewer reports one with more than 2,048, so an address of exactly 2,048 (the text and the schema differ) passes.
- A sitemap index lists at most 50,000 sitemaps and is at most 50 MB; Google’s page repeats the 50,000
loclimit and allows 500 index files for each site in a Search Console account. - Google’s news sitemap: up to 1,000
news:newsentries, of the last two days. Images: up to 1,000 for a page. Video: at most 32 tags for a video, description 2,048 characters, uploader 255, duration 1 to 28,800 seconds.
What is checked
| Check | Rule |
|---|---|
| Well-formed XML | The XML reader of the explorer reports every well-formedness error, such as a bare & in an address, or a cut file. |
| Encoding | UTF-8. |
| Root and namespace | urlset or sitemapindex, in the sitemaps.org 0.9 namespace; no url in an index and no sitemap in a urlset. |
| Address | Protocol: present (required), begins with the protocol, fewer than 2,048 characters, URL-escaped per RFC 3986 and entity-escaped. Viewer: one only; absolute with http or https; no spaces, controls or non-ASCII characters (the protocol also mentions RFC 3987 IRIs, so the non-ASCII rule is the viewer’s stricter reading); no white space around it. |
| Last modified | W3C Datetime (the NOTE): a year, a year and month, a date, or a date with hours and minutes, optional seconds and fraction, and a zone. The calendar is checked (month 13, 30 February, the hour 25 are errors; 1900 is not a leap year). A time without a zone is an error because the NOTE’s TZD is part of every time level; the schema’s xsd:dateTime accepts a missing zone but needs the seconds (see Elements). A date in the future is noted (viewer). |
| Change frequency | One of always, hourly, daily, weekly, monthly, yearly, never, in lower case (the schema enumeration). |
| Priority | A number from 0.0 to 1.0. |
| Elements | One of each in an entry (the schema); no element of the sitemap namespace that the protocol does not define. The order loc, lastmod, changefreq, priority, then extensions, which the schema requires, is not checked by the viewer. |
| Duplicates | The same address listed twice (viewer; no source forbids it). |
| Host and directory | All addresses use the sitemap’s protocol, host and port, and a sitemap covers only its own directory and below. Give the sitemap’s address in the options bar and each address is checked; without it, only a mix of hosts inside the file is reported. |
| Extensions | The requirements and limits on the extensions page. |
Sitemap indexes
An index can list only sitemaps on the same site (Google: in the same directory or deeper, unless cross-submission is set up). The protocol page says the loc of an entry
“can be a Sitemap, an Atom file, RSS file or a simple text file” and does not mention an index; neither the schema, Google’s index page nor its overview says whether an index may list another
index. The viewer notes an address that looks like an index (a name with sitemap_index or
sitemapindex in it) without calling it an error. The explorer cannot fetch the sitemaps an index lists,
so each is shown as an address.
Gzip
A sitemap may be compressed with gzip and served as sitemap.xml.gz. The explorer opens it with the gzip
viewer; the file inside takes the name sitemap.xml from the compressed file’s name (or its stored name), and
so opens as a sitemap when its root says it is one. The 50 MB limit is the size of the unpacked file.