Protocol versus indexing recommendations
- Protocol limit: 50,000 URLs and 50 MB (52,428,800 bytes) uncompressed per file; split larger sets and reference them from a sitemap index.
- Indexing recommendation: preferred, indexable 200 URLs. An XML parser does not verify status, canonical selection or absence of noindex.
- Optional lastmod reflects significant changes to page content, structured data or links, not every build. Google ignores priority and changefreq.
- Declare the sitemap URL in robots.txt or submit it in Search Console; these are discovery methods, not mandatory XML fields.
Special sitemaps
Beyond the standard page sitemap there are extensions for images, video and news, as well as sitemaps with hreflang annotations for language versions. In practice, sitemap generation should be automated and tied to the content publishing cycle.
Example
A minimal sitemap with two URLs: only canonical addresses returning 200, with a real lastmod date.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<lastmod>2026-07-01</lastmod>
</url>
<url>
<loc>https://example.com/pricing</loc>
<lastmod>2026-06-15</lastmod>
</url>
</urlset>Sitemap: https://example.com/sitemap.xmlEscaping and URL scope
Use absolute URLs and UTF-8. Escape & as & in XML independently of URL encoding. By default, keep one host and the scope appropriate to the sitemap location; publishing for other hosts requires the search engine’s cross-site verification and configuration.
<loc>https://example.com/catalog?category=books&language=pl</loc>No. A sitemap helps Google discover and refresh listed URLs, but it does not replace content quality, internal linking or a correct HTTP response. Search Console shows whether the file was read and which URLs are indexed.
Include primarily canonical URLs that return 200 and may be indexed. Remove redirects, noindex URLs, duplicates and lastmod values that do not reflect a real content change.
Automatically after publishing or a real content change. Do not update lastmod on every technical deployment when the page content did not change, or Google may ignore the signal.