What an XML sitemap is
An XML sitemap is a machine-readable list of the URLs on your site that you want search engines to know about, usually served at /sitemap.xml. It helps crawlers discover pages that are new, deep in the site or poorly linked, and tells them when pages last changed.
It does not guarantee indexing. Google still decides which URLs to index based on quality and its own crawling.
Format and limits
Each URL sits in a <url> element with a required <loc> and an optional <lastmod>. A single file may hold up to 50,000 URLs and 50 MB uncompressed; larger sites split URLs across several files and list them in a sitemap index file.
Google ignores <priority> and <changefreq>, but it does use <lastmod> when the dates are consistently accurate, so update it only when the content really changes.
Best practices
List only canonical, indexable URLs that return 200: no redirects, 404s, noindex pages or parameter duplicates. Use absolute URLs on the same host and protocol, generate the file automatically so it stays current, and reference it in robots.txt with a Sitemap: line. Submit it in Google Search Console and Bing Webmaster Tools and watch the indexed count.
Example
A minimal sitemap:
<?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-10-01</lastmod>
</url>
<url>
<loc>https://example.com/pricing</loc>
</url>
</urlset>