Search engines find pages mainly by following links. An XML sitemap gives them a direct list instead, which helps with new pages, large sites, and pages that aren't well linked. Google, Bing and other search engines all read the same format.
What an XML sitemap looks like
<?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-11-04</lastmod>
</url>
<url>
<loc>https://example.com/trail-shoes/</loc>
<lastmod>2026-10-28</lastmod>
</url>
</urlset>Each <url> entry has a <loc> (the full address) and, optionally, a <lastmod> (when the page last changed meaningfully).
What Google uses and ignores
| Tag | Does Google use it? |
|---|---|
loc | Yes, required |
lastmod | Yes, if it's consistently accurate |
changefreq | No, ignored |
priority | No, ignored |
Only set lastmod when the main content changes. If every page always shows today's date, Google learns to ignore it.