What is a sitemap.xml file?
Short answer
sitemap.xml is an XML file that lists the URLs on your site, each in a <url> entry with a <loc> and optional <lastmod>. Search engines use it to discover pages. You point crawlers to it with a Sitemap line in robots.txt or by submitting it in Search Console.
A list of URLs for search engines
A sitemap is an XML file that lists the pages you want search engines to know about. It does not control ranking, but it helps crawlers discover URLs — especially on large sites, new sites, or pages that are not well linked internally.
<?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-19</lastmod>
</url>
<url>
<loc>https://example.com/pricing</loc>
</url>
</urlset>The tags
<urlset>— the root element, with the sitemaps.org namespace<url>— one entry per page<loc>— the full, absolute URL (required)<lastmod>— when the page last changed (recommended; Google uses it)<changefreq>and<priority>— hints that Google now largely ignores
Big sites: a sitemap index
A single sitemap is limited to 50,000 URLs and 50 MB uncompressed. Larger sites split URLs across multiple sitemaps and list them in a sitemap index file that uses <sitemapindex> and <sitemap> tags.
How to submit it
- Add a
Sitemap: https://example.com/sitemap.xmlline to robots.txt - Submit the URL in Google Search Console and Bing Webmaster Tools
- Serve it over HTTPS with a correct XML content type