What a sitemap.xml really is
A sitemap is an XML file that lists every URL on your site you want search engines to know about, plus optional metadata: when it was last modified, how often it changes, and how important it is relative to other URLs.
Search engines can find your pages without a sitemap — but a sitemap dramatically speeds up discovery of new URLs and helps re-crawl pages that changed.
Paste one URL per line. We deduplicate, validate, and emit a valid <urlset> document in your browser. Nothing is uploaded.
Anatomy of a URL entry
<url>
<loc>https://example.com/pricing</loc>
<lastmod>2025-06-01</lastmod>
<changefreq>weekly</changefreq>
<priority>0.8</priority>
</url>
<loc>— the absolute URL. Must match the canonical for that page.<lastmod>— ISO 8601 date or datetime. Google now largely trusts this signal for prioritizing re-crawl.<changefreq>— hint only. Google ignores it in practice, but Bing and Yandex still read it.<priority>— hint only. Google ignores it. Bing reads it. Set 1.0 on your home page, 0.8 on core pages, 0.5 on long-tail.
Size limits you have to respect
| Limit | Value |
|---|---|
| URLs per sitemap | 50,000 |
| Uncompressed size | 50 MB |
Compressed (.gz) size |
50 MB |
Above any of these, split into multiple sitemaps and reference them from a sitemap index:
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<sitemap><loc>https://example.com/sitemap-1.xml</loc></sitemap>
<sitemap><loc>https://example.com/sitemap-2.xml</loc></sitemap>
</sitemapindex>
Priority — what to actually set
| Page type | Suggested priority |
|---|---|
| Home page | 1.0 |
| Category / hub pages | 0.9 |
| Product / article pages | 0.8 |
| Long-tail / archive pages | 0.5 |
| Legal, About, Contact | 0.3 |
Google mostly ignores priority; setting sensible values still helps Bing and gives you a mental map of your site's importance.
Common mistakes
- Listing URLs you
noindex. Never. If a URL is noindexed, remove it from the sitemap. - Different casing in loc vs. canonical. Match casing exactly —
/Pricingand/pricingare two URLs to a crawler. - Including URL fragments or tracking parameters. Strip
#sectionand?utm_*before adding. lastmodin the future. Search engines will devalue your sitemap.- Forgetting to reference the sitemap. Add
Sitemap: https://example.com/sitemap.xmlto yourrobots.txtand submit it in Search Console.
After you generate
- Save the file as
sitemap.xmlat the root of your host. - Add
Sitemap:lines to yourrobots.txt. - Submit it in Google Search Console and Bing Webmaster Tools.
- Regenerate when you add or remove URLs — not on every page change.
For images, video or Google News, use dedicated sitemap types. This tool covers standard <urlset> sitemaps, which are correct for 95% of sites.
FAQ
How often should I regenerate? Whenever URLs are added, moved or removed — not on every content edit.
Should I split sitemaps by content type? For sites over ~10,000 URLs, yes — e.g. sitemap-articles.xml, sitemap-products.xml. Reference them all from a sitemap index.
Does the file name matter? No, but sitemap.xml is the convention. As long as robots.txt and Search Console point at it, any filename works.