An XML sitemap is a file that lists the URLs you want search engines to know about. It is not required to rank, but it accelerates discovery of new and updated pages, especially on large or heavily interlinked sites.
What to include
- Canonical URLs only — never include a URL that redirects or is a duplicate
- Pages you want indexed — not cart, checkout, thank-you or admin pages
- A realistic
lastmodthat changes when the page actually changes
The size limits
- Up to 50,000 URLs and 50MB uncompressed per file
- Beyond that, use a sitemap index that references multiple sitemap files
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-09-30</lastmod>
</url>
</urlset>How to submit
Reference the sitemap from robots.txt and submit the URL in Google Search Console and Bing Webmaster Tools. Most frameworks can generate a sitemap automatically — for example Next.js, WordPress and Shopify.
Common mistakes
- Listing non-canonical or 404 URLs
- Never updating
lastmod - Including thousands of low-value parameter URLs
- Assuming a sitemap fixes an indexing problem — it does not override
noindex,robots.txtblocks, or thin content
Generate one
Paste your URLs into the free sitemap generator and copy a valid XML file, or use the API to build sitemaps in bulk.