What is a sitemap?
A sitemap is a file that lists the URLs on your site you want search engines to crawl, with optional notes on when each page last changed.
Search engines find pages in two ways: by following links from pages they already know, and by reading lists that site owners give them. A sitemap is that list. The format most sites use is XML, defined by the sitemaps.org protocol that Google, Bing and Yahoo agreed on in 2006. Here is a complete, valid one:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2026-09-14</lastmod>
</url>
<url>
<loc>https://www.example.com/shop/boots/trail-x</loc>
<lastmod>2026-08-30</lastmod>
</url>
</urlset><loc> is the only required tag: the full URL of one page. <lastmod> tells crawlers when the page's content last changed meaningfully. Two more optional tags, <changefreq> and <priority>, exist in the protocol, but Google has said it ignores them (details).
Watch a crawler find your pages
Below is a ten-page shop. Run the crawl with links only, then again with a sitemap. Look at the red-outlined page: it's a campaign landing page nothing links to, a so-called orphan.
Loading the interactive crawl…
Two things change when the sitemap is there. The orphan page gets found at all, and the page five clicks deep is found in the second round instead of the sixth. On a real site with millions of URLs and a limited crawl budget, that difference decides whether new products show up in search this week or next month.
What the sitemap does not do is vouch for a page. Google still decides what to index based on the page itself. A sitemap full of thin, duplicate or redirecting URLs teaches it that your list isn't worth much.
Do you need one?
Google's guidance is that you probably need a sitemap if any of these is true:
- The site is large: hundreds of pages or more.
- The site is new and has few external links pointing to it.
- Pages are poorly linked to each other, like archives, filtered listings or campaign pages.
- There's a lot of video, images or news that you want in those specific search features.
For a well-linked site of a few dozen pages, it's optional, but it takes two minutes and gives you Search Console's per-sitemap indexing report, which is useful on its own.
The round-by-round narration in the crawl above is a nod to narrated explainers like ahaboo’s walk-through of why the Moon has phases.
The other kinds of sitemap
- Sitemap index: a sitemap of sitemaps, needed past 50,000 URLs or 50 MB per file. Split a sitemap.
- Image, video and news sitemaps: XML extensions that add media or article details to each URL. Image, video, news.
- hreflang sitemaps: list each page's language versions. hreflang in sitemaps.
- HTML sitemap: a page of links for people. Generator.
Ready to make one? The XML sitemap generator crawls your site or takes a pasted list, and the step-by-step guide covers uploading and submitting it.
Questions people ask
What is a sitemap in simple terms?
/sitemap.xml. It works like a table of contents handed straight to Google and Bing, so they don't have to discover every page by following links.