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 and Google’s pages, read through summaries (the words are ours).
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.
- An address has fewer than 2,048 characters. The viewer reports one with more than 2,048; the protocol’s own words are “less than”, so an address of exactly 2,048 is a borderline case it lets pass.
- Google’s news sitemap: up to 1,000 news entries, of the last two days. Images: up to 1,000 for a page.
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 | Present; one only; absolute with http or https; URL-escaped (no spaces, controls or non-ASCII characters); no white space around it. |
| Last modified | W3C Datetime: a year, a year and month, a date, or a date with a time 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; a date in the future is noted. |
| Change frequency | One of always, hourly, daily, weekly, monthly, yearly, never, in lower case. |
| Priority | A number from 0.0 to 1.0. |
| Elements | One of each in an entry; no element of the sitemap namespace that the protocol does not define. |
| Duplicates | The same address listed twice. |
| 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. The protocol page does not say 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.