What is an XML Sitemap? SEO Guide
Definition
An XML sitemap is a file that lists the URLs on a website you want search engines to discover and crawl. It uses a structured XML format defined by the Sitemaps protocol and can include metadata such as the last modification date, change frequency, alternate language versions (hreflang), and image or video data.
Why XML sitemaps matter
- Discovery — surfaces pages that internal linking might not reach quickly, especially on large or new sites.
- Multilingual signals — declares hreflang alternates so the right language version surfaces in each market.
- Crawl prioritization —
lastmodhints help search engines focus on pages that actually changed. - Index coverage reporting — Google Search Console reports indexing status against URLs you submitted in a sitemap.
Best practices
- Only include canonical, indexable URLs that return a 200 status — never list redirects, 404s, or noindexed pages.
- Keep individual sitemaps under 50,000 URLs or 50 MB uncompressed; use a sitemap index for larger sites.
- Reference your sitemap in robots.txt with a
Sitemap:directive. - Submit it in Google Search Console and Bing Webmaster Tools.
A clean XML sitemap accelerates indexing and improves coverage reporting. Make sure every URL it lists is reachable — scan your site to catch broken or redirected URLs that should not be in your sitemap.
Related terms
robots.txt
The file that tells crawlers which parts of your site they can access.
hreflang
The HTML attribute that tells search engines which language version to serve.
noindex
The directive that keeps a page out of search engine indexes.
Internal Link
Links between pages on the same domain — the backbone of site structure.
Crawl Budget
How search engines allocate resources to crawl your site — and why broken links waste it.
www vs non-www
Choosing the canonical hostname — and why consistency matters more than the choice itself.