Learn line

What is a sitemap?

An XML sitemap is a list of the URLs on your site that you want search engines to crawl, with optional hints about when each one changed. It is a timetable for crawlers, not a ranking lever.

How a crawler finds pages

Search engines discover URLs in two main ways: following links from pages they already know, and reading lists you give them. Links work well for pages that are linked prominently. They work badly for pages that are new, deep in the site, or not linked at all.

Step through the demo. In Links only mode the crawler needs several rounds to reach the product pages, and it never finds the two orange orphan pages, because nothing links to them. Switch to Links + sitemap and every URL is known from the first round.

Real crawlers don't move in tidy rounds, and a known URL isn't instantly crawled or indexed. The shape is right, though: sitemaps shorten discovery and catch pages the link graph misses.

Home/blog/shoppost 1post 2kettlesblue kettlered kettlearchivenew launchorphanpromo pageorphan
0crawl round
1 / 11pages known
0 / 2orphans found

The crawler starts at the home page. It knows nothing else yet.

Do you need one?

Google's documentation is specific. A sitemap helps most when:

  • the site is large, so new or updated pages are easy to overlook;
  • the site is new and has few external links pointing to it;
  • there are poorly linked or orphaned pages (landing pages, filtered archives, old content);
  • there is rich media or news you want described with image, video or news extensions.

A small site (roughly 500 pages or fewer) with good internal links may not need one. Even then it costs nothing and gives you a per-sitemap indexing report in Search Console.

The crawl demo above makes a simple point: a page existing on your server and a crawler knowing it exists are separate facts. Closing gaps like that, between how something looks and how it actually works, is what ahaboo's narrated explainers do for topics like photosynthesis.

Anatomy of one entry

<url>
  <loc>https://example.com/kettles/blue</loc>
  <lastmod>2026-09-21</lastmod>
</url>
  • loc: required, the full canonical URL.
  • lastmod: optional, when the page's content last meaningfully changed.
  • changefreq, priority: optional, ignored by Google.

Sitemap best practices

  1. List canonical URLs only. No redirects, 404s, noindexed pages or ?sort= variants. Every non-canonical URL weakens the file as a signal.
  2. Use the exact form you want indexed. Same protocol, same host (www or not) and the same trailing-slash convention as your canonical tags.
  3. Make lastmod truthful or leave it out. Stamping today's date on every URL at every build teaches crawlers to ignore it.
  4. Split before you hit limits. 50,000 URLs or 50 MB per file; many sites split by section for clearer reporting. See the splitter.
  5. Declare it in robots.txt with an absolute Sitemap: URL. Other search engines read that line too. How to add it.
  6. Submit it in Search Console and watch the “Discovered” vs indexed numbers. Step by step.
  7. Keep it fresh automatically. A sitemap that is six months stale is worse than none. Generate it on publish, or rebuild it from your export on a schedule.

Questions people ask

What is a sitemap in simple terms?
A file on your website that lists the pages you want search engines to know about, usually /sitemap.xml. Each entry is a URL, optionally with the date it last changed.
Do I need a sitemap?
Google says you may not if your site is small (about 500 pages or fewer), well linked internally, and has little media or news content. You probably do if the site is large, new with few external links, has pages that aren’t linked from anywhere, or changes often. It never hurts to have one.
Does a sitemap improve rankings?
No. A sitemap affects discovery and recrawling, not ranking. It can get a page into the index sooner, but how that page ranks depends on its content and links.
What’s the difference between an XML sitemap and an HTML sitemap?
An XML sitemap is for crawlers: a machine-readable list following the sitemaps.org protocol. An HTML sitemap is an ordinary page of links for people. Both can help discovery, but only the XML version can be submitted to Search Console.
Which pages should go in a sitemap?
Canonical, indexable pages that return HTTP 200. Leave out redirects, 404s, noindexed pages, parameter duplicates and pages blocked by robots.txt. Google treats listing a URL as a weak signal that it is the canonical version.
How do I create a sitemap?
Most CMSs generate one (WordPress core, Yoast, Shopify, Wix). For a custom or static site, export your URL list and paste it into the SitemapStudio generator, or generate the file in your build step. Then reference it in robots.txt and submit it in Search Console.