XML sitemap
A file that lists the URLs you want search engines to know about, so new and deep pages are found sooner.
What it is
An XML sitemap follows the sitemaps.org protocol. One file can hold up to 50,000 URLs or 50 MB uncompressed, and a sitemap index groups several files. Google uses the URLs and a reliable lastmod date, and ignores the priority and changefreq values.
Why it matters
A sitemap speeds up discovery, especially for new pages and pages with few internal links, and it shows which URLs you consider the real, indexable versions. It does not force indexing.
Common mistakes
- Listing redirected, 404, noindex or non-canonical URLs
- Setting lastmod to the build date on every deploy so it carries no information
- Never submitting the file in Search Console or naming it in robots.txt
- A sitemap that disagrees with canonicals and hreflang
How I handle it
I generate the sitemap from the same source as the pages, keep only indexable canonical URLs that return 200, use lastmod only when it reflects a real change, and submit it in Search Console.
How to check it
- Open the sitemap and spot-check URLs for status code, noindex and canonical.
- Compare the number of sitemap URLs with the indexed count in Search Console.
- Make sure it is submitted and referenced in robots.txt.
- Check that lastmod only changes when the page really changes.
Illustrative example
Example scenario: a store sitemap lists filtered URLs that canonical to the category page. Search engines see a contradiction. Removing them leaves a clean list of pages that should rank.
Frequently asked questions
Does a sitemap guarantee indexing?
No. It helps discovery. Indexing still depends on quality and signals.
Do I need a sitemap for a small site?
It is not required for a small, well-linked site, but it is cheap and gives you a useful report in Search Console.
Related terms
Related services
Sources
- What is a sitemap · Google Search Central
- Build and submit a sitemap · Google Search Central
- Sitemaps XML protocol · sitemaps.org