An XML sitemap is a file that lists the URLs you want search engines to know about. It's a hint, not a command, but a well-built sitemap speeds up discovery and helps with large sites.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/page1</loc>
<lastmod>2026-04-18</lastmod>
<priority>0.8</priority>
</url>
...
</urlset>
<loc>, required; absolute URL<lastmod>, optional but useful; tells Google which pages changed<changefreq>, essentially ignored by Google; don't bother<priority>, also ignored; don't waste time settingIncluding garbage URLs sends mixed signals and wastes crawl budget.
Over these limits, split into multiple sitemaps + use a sitemap index file.
For large sites, create a sitemap index that lists child sitemaps:
<?xml version="1.0"?>
<sitemapindex xmlns="...">
<sitemap><loc>https://example.com/sitemap-posts.xml</loc></sitemap>
<sitemap><loc>https://example.com/sitemap-products.xml</loc></sitemap>
</sitemapindex>
https://yourdomain.com/sitemap.xml (standard location)robots.txt: Sitemap: https://yourdomain.com/sitemap.xmlOn CMS-driven sites (WordPress, Shopify, etc.), the sitemap should update automatically when content changes. Most modern CMSes handle this via plugins (Yoast, RankMath) or built-in features.
Small sites (<100 pages) with good internal linking don't strictly need a sitemap. Google will find everything anyway. But there's no cost to including one, so always do.