Sitemap.xml: rules and limits
A sitemap is a list of addresses you want search engines to know about.
The format
The Sitemap protocol (sitemaps.org) uses XML. It says the file must be UTF-8, begin with an opening urlset tag and end with </urlset>, give the namespace in the urlset tag, and include a url entry for each address with a loc child. All values must be entity-escaped, so & in an address is written &.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/catalog?item=12&desc=vacation</loc>
<lastmod>2026-11-14</lastmod>
</url>
</urlset>
Limits
Each sitemap file may have at most 50,000 addresses and be at most 50 MB (52,428,800 bytes) uncompressed. You may compress with gzip to save bandwidth. Larger sites use several files and a sitemap index file that lists them.
lastmod
The protocol says the value should be in W3C Datetime format, which includes a plain date such as 2026-11-14. Use it only to say when the page really last changed.
Telling search engines
- Submit the address in Search Console.
- Or add a line to
robots.txt:Sitemap: https://www.example.com/sitemap.xml.
What to include
List the addresses you want found: pages that can be indexed, with the preferred (canonical) address. Leave out pages with noindex, redirected addresses and error pages. Blogger and many content systems make a sitemap by themselves: check yours before you make another.
Use the generator on this site for small sites, and test the result by opening it in a browser.
Does a sitemap improve ranking?
It helps search engines discover pages. It does not decide what they list or how high a page ranks.
Can an address on another domain be listed?
Only under its own location. The protocol says a sitemap at /catalog/sitemap.xml can include addresses that start with /catalog/ but not ones that start with /images/. A sitemap can also be proven for another host through a Sitemap line in that host's robots.txt.
Sources
- sitemaps.org protocol (sitemaps.org/protocol.html), read 14 November 2026
Read on 14 November 2026.
This is an independent guide. It is not connected with Google, Meta, X, schema.org or any company named here. Facts were read on 14 November 2026 from the pages named on each page. The generators run in your browser and send nothing anywhere.