The essentials
- Definition: an XML sitemap is a file listing the URLs of a site you want crawled and indexed, each with its last modification date.
- What it does: it helps engines discover new or modified pages; it guarantees neither indexing nor ranking.
- Format: 50,000 URLs and 50 MB per file at most, a sitemap index beyond that; only the lastmod tag is genuinely used by Google in 2026.
- Best practice: list only canonical URLs returning 200, declare it in robots.txt and Search Console, regenerate it with every publication.
A XML sitemap is a file, generally placed at the site's root (/sitemap.xml), listing the URLs the publisher wants search engines to crawl and index, with each one's last modification date. It is a site map for crawlers, not for visitors. It complements the robots.txt file, which says what not to crawl, and internal linking, which remains the primary way pages are discovered.
What an XML sitemap contains
| Tag | Role | Use by Google in 2026 |
|---|---|---|
loc | The page's full URL | Required, used |
lastmod | The content's real last modification date | Used, provided it is reliable |
changefreq | The assumed update frequency | Ignored |
priority | Relative importance from 0 to 1 | Ignored |
One file takes 50,000 URLs and 50 MB uncompressed; beyond that, you create several sitemaps referenced by an index file. Specialist sitemaps exist for images, video and news. A multilingual site can declare its language alternatives there, alongside the hreflang.
What a sitemap does, and what it doesn't
A sitemap speeds up the discovery of new or modified pages, above all on sites of several thousand pages, on recent sites with no inbound links, and on deep, poorly linked pages. It doesn't force indexing: Google crawls the listed URLs then decides on its own whether to index them, according to their quality and usefulness. It has no influence on ranking. On a well-linked 50-page site its effect is marginal; it remains useful for the modification date and for Search Console's indexing report, which compares sitemap URLs against indexed URLs. The AI engines that crawl the web (OpenAI, Perplexity, Anthropic) also read sitemaps to discover pages; see indexing by AI.
Best practice
- List only indexable URLs: canonical, returning 200, with no noindex and no session parameter. A URL that redirects, 404s or carries a noindex in the sitemap sends a contradictory signal.
- An honest lastmod: the date of the last content change, not the date the file was generated. A lastmod that changes daily with no real modification ends up ignored.
- Declare it: one
Sitemap: https://www.exemple.fr/sitemap.xmlline in robots.txt and a submission in Search Console. - Regenerate it automatically: on every publication, edit or deletion; a static sitemap goes stale within weeks.
- Split it on large sites: one sitemap per content type (pages, articles, products) makes the indexing report easier to read.
- Use the canonical domain: with or without www, on https, identical to the canonical tags.
Checking your sitemap
Search Console's Sitemaps section says whether the file was read, how many URLs were discovered and what reading errors occurred; the Pages report then compares submitted URLs against indexed URLs and explains the exclusions. A crawler such as Screaming Frog detects sitemap URLs absent from the internal linking and vice versa. The indexing report is covered in indexing in Search Console.
The frequent mistakes
- The catch-all sitemap: pagination pages, filters, tags, archives, redirecting URLs; it dilutes the signal.
- The forgotten sitemap: generated at launch, never updated; new pages don't appear in it.
- The wrong domain: URLs without www in the sitemap and canonicals with www; the two must match.
- The blocked sitemap: a Disallow rule in robots.txt preventing it from being read.
- The sitemap as an indexing fix: a low-quality page won't be indexed because it's in the sitemap; the problem is the content or the linking.
How GreenRed helps
Rather than juggling several tools, GreenRed's Site health module brings these metrics together in a single dashboard, compares them over time and tells you which actions come first. You can try it free, with no card, from the Pricing.
Frequently asked questions
What is an XML sitemap for?
To help search engines and AI crawlers discover a site's pages and their modification dates. It speeds up the crawling of new or deep pages, but guarantees neither indexing nor ranking, which depend on the page's quality and its internal linking.
Does a small site need a sitemap?
Not for discovery, if the pages are well linked to each other. It stays useful for passing on the modification date and for reading Search Console's indexing report, which compares submitted URLs with indexed URLs. Most CMSs generate it automatically.
What should go in a sitemap?
Only the URLs you want indexed: canonical, returning 200, with no noindex, on the canonical domain. Pagination pages, filters, and URLs that redirect or 404 must be taken out.
Are the priority and changefreq tags useful?
No. Google has confirmed it ignores them. Only the lastmod tag is taken into account, provided it reflects a real content change; a lastmod updated artificially ends up ignored too.