Glossary · Beginner
XML sitemap
A sitemap is an XML file listing the canonical URLs you want discovered, offered to search engines as a crawl hint rather than a guarantee.
- Published
- Last checked
Definition
A sitemap is an XML document listing URLs on your site, usually served at
/sitemap.xml and referenced from robots.txt. It helps search engines
discover pages, particularly ones that internal links reach poorly.
A hint, not an instruction
Listing a URL does not cause it to be indexed. The sitemap speeds discovery and signals which addresses you consider canonical. Indexing remains the search engine's decision, based on the page itself. Anyone promising indexation because a URL was submitted is describing something the protocol does not offer.
Only successful canonical URLs belong in it
A sitemap should contain addresses that return 200, are canonical, and are indexable. Redirects, 404s, noindexed pages, filtered views, and search results all weaken the signal. A sitemap full of URLs that do not resolve is worse than no sitemap, because it teaches the crawler to trust it less.
Generate it, do not maintain it
Any sitemap edited by hand will eventually disagree with the site. Generating it from the same source of truth that produces your routes keeps the two aligned and makes drift structurally impossible.
Common failures
- Entries that redirect to another address.
- Pages listed while carrying a noindex directive.
- Stale URLs left behind after a route rename.
- A sitemap the robots file never references.
- Parameter variations listed alongside their canonical.
Review question
Fetch the deployed sitemap, take a sample of its URLs, and request each one directly. Do they all return 200, declare themselves canonical, and allow indexing? A sitemap is only as useful as the addresses inside it.