CoreCited
Technical

What is a sitemap? A plain explanation, with annotated XML sitemap examples

What is a sitemap, do you need one, and does it help SEO? Answers from Google's docs, with annotated XML sitemap examples for pages, images and video.

AlexFounder & Developer11 min read

A sitemap is a file that lists the pages on your website you want search engines to know about. Google’s definition: “a file where you provide information about the pages, videos, and other files on your site, and the relationships between them.” Search engines read it “to crawl your site more efficiently”[1]. That is the whole idea. The rest of this page shows what one looks like, tag by tag, when you need one, and what it can and cannot do for SEO and for AI search.

Already have one? Paste your domain into the free sitemap validator to see your own sitemap laid out, with every problem flagged.

Key takeaways
1A sitemap lists the URLs you want search engines to find. Most are XML files at /sitemap.xml, made by your CMS.
2It is a hint. Google says it does not guarantee that the pages in it will be crawled or indexed.
3Only <loc> is required. Google uses <lastmod> when it is accurate and ignores <priority> and <changefreq>.
4Google says a well linked site of about 500 pages or fewer may not need one. Large, new and media-heavy sites benefit most.
5A sitemap helps pages get found. It does not make them rank.
50000
URLs per sitemap file at most
sitemaps.org
50 MB
per file, uncompressed (52,428,800 bytes)
sitemaps.org
500
pages or fewer: Google's rough line for a site that may not need one
Google Search Central
1000
images that one page entry in an image sitemap can list
Google Search Central

Sources: the sitemap protocol[3]; Google’s sitemap overview[1] and image sitemap guide[5].

What a sitemap is, and the three things people mean by it

Definition · Sitemap
A list of the pages on a website. In SEO it almost always means an XML sitemap: a file in the format defined at sitemaps.org that tells search engines which URLs exist and, optionally, when each changed.

The word covers three different things, and most confusion comes from mixing them up[17]:

  • A planning sitemap. A diagram designers draw before building a site, showing its pages and how they connect. It never goes online.
  • An HTML sitemap. A page for visitors, usually linked from the footer, listing the site’s sections. Crawlers can follow its links too.
  • An XML sitemap. A file for crawlers. This is the one Search Console asks for, and the one this page is about.

The XML format is shared: “Google supports the sitemap formats defined by the sitemaps protocol”[2], and Bing says it “continues full support of the Sitemap protocol”[12]. One file serves every search engine.

An XML sitemap example, line by line

Here is a minimal, valid XML sitemap example with two pages. The comments mark the six things that matter; you can leave them in, since XML comments are ignored.

sitemap.xml: a minimal valid example, annotated
<?xml version="1.0" encoding="UTF-8"?>
<!-- 1. The root. The xmlns value must be exactly this. -->
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

  <!-- 2. One <url> per page -->
  <url>
    <!-- 3. Required: the full, absolute URL, as you want it in search results -->
    <loc>https://www.example.com/</loc>
    <!-- 4. Optional: when the page last changed in a significant way -->
    <lastmod>2026-09-30</lastmod>
  </url>

  <url>
    <!-- 5. Escape & as &amp; inside URLs, or the file will not parse -->
    <loc>https://www.example.com/shoes?colour=red&amp;size=9</loc>
    <!-- 6. A date and time needs a time zone -->
    <lastmod>2026-10-02T09:15:00+00:00</lastmod>
  </url>

</urlset>

The rules behind each comment come from the protocol and Google:

  • The root and namespace. The file must open with <urlset>, close with </urlset> and specify the namespace in the opening tag. It must be UTF-8[3].
  • Full URLs. Each <loc> must begin with the protocol and be under 2,048 characters[3]. Google asks for “fully-qualified, absolute URLs” and says it will crawl them “exactly as listed”[2].
  • Only URLs you want in search. “Include the URLs in your sitemap that you want to see in Google’s search results”, meaning the canonical version of each page[2].
  • Escaping. An ampersand must be written &amp;, and the same applies to quotes and angle brackets[3].
  • One host. All URLs in a sitemap must come from a single host, and a sitemap in a folder can only list URLs in that folder[3].
  • Order does not matter. Google: “You don’t have to worry about the order of the URLs in your sitemap”[2].

The four tags, and what Google does with each

Sitemap tags: required, optional, and actually used
From the sitemap protocol and Google's and Bing's documentation, read 11 October 2026. Toggle columns.
In the protocolGoogleBing
<loc>RequiredCrawls the URL exactly as listedRequired
<lastmod>Optional. Date the page was last modifiedUsed if "consistently and verifiably" accurateA "key signal" for what to recrawl
<changefreq>Optional. "A hint and not a command"IgnoredIgnored
<priority>Optional. 0.0 to 1.0, relative to your own pagesIgnoredIgnored

Sources: protocol[3]; Google[2]; Bing[12]. The guide to lastmod, priority and changefreq covers the dates in depth.

A sitemap index example

One file may hold at most 50,000 URLs or 50 MB uncompressed. Past that, you split the URLs into several sitemaps and list them in a sitemap index, which has the same shape with a different root[3]. Google lets you submit the index alone instead of every file[4].

sitemap_index.xml: an index of two sitemaps
<?xml version="1.0" encoding="UTF-8"?>
<!-- A sitemap index lists sitemaps, not pages -->
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://www.example.com/sitemaps/posts.xml</loc>
    <!-- When this sitemap file changed, not the pages in it -->
    <lastmod>2026-10-01T18:23:17+00:00</lastmod>
  </sitemap>
  <sitemap>
    <!-- Child sitemaps may be gzipped -->
    <loc>https://www.example.com/sitemaps/products.xml.gz</loc>
  </sitemap>
</sitemapindex>

In an index, <lastmod> is when the child sitemap file changed. The protocol says it “does not correspond to the time that any of the pages listed in that Sitemap were changed”, and lets a crawler fetch only the sitemaps modified since its last visit[3]. Google does not allow an index inside an index; Search Console reports it as nested indexing[9].

Image, video, news and language examples

Google supports extensions that add detail to a <url> entry. Each one declares its own namespace on the root, and each can live in your main sitemap or in a separate file[5][6][7].

For images Google “might not otherwise find (such as images your site reaches with JavaScript code)”. Each <url> can list up to 1,000 images, and images may sit on another domain if both are verified in Search Console[5].
Image sitemap
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
  <url>
    <loc>https://www.example.com/recipes/flatbread</loc>
    <!-- Up to 1,000 images per page -->
    <image:image>
      <image:loc>https://www.example.com/img/flatbread.jpg</image:loc>
    </image:image>
    <image:image>
      <image:loc>https://cdn.example.com/img/flatbread-dough.jpg</image:loc>
    </image:image>
  </url>
</urlset>

What real sitemaps look like

Examples in documentation are tiny. Real ones are not. Here is what five public sites served when we fetched their sitemaps on 11 October 2026:

Five real sitemaps, as fetched on 11 October 2026
Found through each site's robots.txt. Counts are for the files we could read in one run of the validator's checks.
ShapeSizeWorth noticing
nextjs.orgOne <urlset>713 URLsEvery URL dated; all 20 sampled URLs answered 200
yoast.comA sitemap index of 21 files1,698 entries in the 20 we read36 duplicate URLs; 128 entries without a date
www.wix.comOne <urlset>10,525 URLs79% share one lastmod timestamp; one date in the future
techcrunch.comAn index of 2,000+ files, plus a news sitemap10,023 entries in the first 51 filesrobots.txt disallows GPTBot and ClaudeBot from every one
nytimes.com25 sitemaps declared in robots.txtNot countedSeparate files for news, video, recipes, Wirecutter and more, some gzipped

Two lessons. First, a large site’s sitemap is a tree, which is why the guide to finding a sitemap starts with robots.txt rather than one URL. Second, being valid XML is not the same as being right. Duplicates, missing or identical dates and URLs blocked for some crawlers all pass a schema check.

Do I need a sitemap?

Google answers this directly. “If your site’s pages are properly linked, Google can usually discover most of your site”, but a sitemap “can improve the crawling of larger or more complex sites”[1]. Its two lists, in full:

Google's guidance: when a sitemap helps
Quoted and condensed from Google's 'Learn about sitemaps', updated 10 December 2025.
You might need one ifYou might not if
SizeYour site is large, so some pages may not be linked from any otherYour site is about 500 pages or fewer (counting only pages you want in search)
LinksYour site is new and has few external linksEvery important page can be reached by links from the home page
MediaYou have a lot of video or images, or appear in Google NewsYou have few media files or news pages you want in search

Two more cases from Google. If you use a CMS such as WordPress, Wix or Blogger, “it’s likely that your CMS has already made a sitemap available”[1]. And Search Console’s help says hosted sites on services such as Squarespace or Wix probably have it managed for them[9]. Even when you could skip it, Google adds that “in most cases, your site will benefit from having a sitemap”[1]. It costs little, so most sites should have one.

Does a sitemap help SEO?

It helps search engines find pages. It does not help them rank. Google is careful here: a sitemap “helps search engines discover URLs on your site, but it doesn’t guarantee that all the items in your sitemap will be crawled and indexed”[1]. Submitting one “is merely a hint”[2]. The protocol says the same about the tag most people tweak: priority “is not likely to influence the position of your URLs in a search engine’s result pages”[3].

What a good sitemap does for SEO, in practice:

  • Discovery. New pages and pages with few internal links get found sooner.
  • Recrawling. Accurate <lastmod> dates tell Google and Bing which pages changed. Bing says the date helps it “prioritize URLs for recrawling and reindexing, or skip them entirely if the content hasn’t changed”[12].
  • Canonical hints. Google “generally shows the canonical URLs in its search results, which you can influence with sitemaps”[2]. List the version of each page you prefer.
  • Diagnostics. Search Console counts the pages discovered in each submitted sitemap and lets you filter the Page indexing report by sitemap[9].
Myth
A sitemap gets your pages indexed.
What is true
Google calls it a hint and says it doesn't guarantee crawling or indexing. Pages still have to be worth indexing.
Myth
Setting priority to 1.0 on key pages helps them rank.
What is true
Google and Bing ignore <priority>, and the protocol says it is not likely to influence position.
Myth
Every site needs a sitemap.
What is true
Google says a well linked site of about 500 pages or fewer may not. It is still cheap and usually worth having.

Sitemaps and AI crawlers

Separate what is documented from what is assumed.

Documented by Bing. In July 2025, Bing wrote that for AI powered search engines, “freshness signals directly influence how quickly updates are reflected in search results and AI generated answers”, and that <lastmod> remains a key signal[12]. The same post says a working sitemap supports “both traditional search and AI-powered experiences like Copilot”[12].

Documented by Google. To appear as a supporting link in AI Overviews or AI Mode, “a page must be indexed and eligible to be shown in Google Search with a snippet”, with “no additional technical requirements”[11]. A sitemap helps indexing, so it helps eligibility, and nothing more specific than that.

Not documented by the AI companies. OpenAI’s crawler page describes OAI-SearchBot, which surfaces sites in ChatGPT search, and GPTBot, which collects training data[14]. Anthropic describes ClaudeBot and Claude-SearchBot[15], and Perplexity describes PerplexityBot, which “is designed to surface and link websites in search results on Perplexity”[16]. All three explain their robots.txt rules. None of the three pages, as we read them on 11 October 2026, mentions sitemaps. So nobody outside those companies can tell you how much their crawlers use one.

What you can control
Declare the sitemap in robots.txt, where any crawler can find it; Google and Bing both accept that line[2][12]. Then make sure robots.txt does not block the URLs you list for the crawlers you want. The AI crawler checker shows what your robots.txt tells each AI bot, and whether to block GPTBot covers the trade-off.

How to make and submit one

Google lists three routes: let your CMS generate it, write it by hand if it has “less than a few dozen URLs”, or generate it from your site’s database for anything larger[2]. On WordPress, Shopify, Wix and Squarespace it already exists; the guide to finding a sitemap gives each platform’s address. On a Next.js site, the Next.js sitemap guide has the code.

Then tell search engines where it is. Google accepts three ways: the Sitemaps report in Search Console, the Search Console API, or a line anywhere in robots.txt, such as Sitemap: https://example.com/my_sitemap.xml[2]. Google retired its old sitemap “ping” endpoint in 2023[10]; the lastmod guide explains what took its place. If Search Console then says the sitemap could not be read, that guide walks through each cause.

A sitemap is a list of hints, not a list of orders. It helps pages get found; it does not make them rank.
A sitemap worth having
0/6

Questions people ask

What is a sitemap in simple words?

A sitemap is a file that lists the pages on a website you want search engines to know about, with optional details such as when each page last changed. Search engines read it to find pages they might miss by following links. It is usually an XML file at /sitemap.xml, generated by your CMS.

Do I need a sitemap?

Google says you might not if your site is about 500 pages or fewer, is well linked internally, and has few videos, images or news pages you want in search. You probably need one if the site is large, new with few external links, or heavy on video, images or news. If you use Wix, Squarespace or a similar host, it probably makes one for you.

Does a sitemap help SEO?

It helps search engines find and crawl your pages, which is the first step to ranking. It does not make pages rank higher, and Google says it does not guarantee that every listed page will be crawled or indexed. The optional priority tag does not change rankings either.

What is an example of an XML sitemap?

The smallest valid one is an XML declaration, a <urlset> root with the namespace http://www.sitemaps.org/schemas/sitemap/0.9, and one <url> holding a <loc> with a full URL. You can add a <lastmod> date. This page shows that example annotated line by line, plus index, image, video, news and hreflang examples.

What is the difference between an HTML sitemap and an XML sitemap?

An HTML sitemap is a page for people, usually linked from the footer, listing the site's sections and pages. An XML sitemap is a file for crawlers, in the format defined at sitemaps.org. They do different jobs, and a site can have both.

Do AI crawlers use sitemaps?

Bing says sitemaps and accurate lastmod dates influence how quickly updates reach its search results and AI generated answers. Google's AI Overviews and AI Mode only cite indexed pages. OpenAI, Anthropic and Perplexity document their crawlers and robots.txt rules but, on the pages we read, say nothing about sitemaps.

Keep reading

Sources

[1]Learn about sitemaps — Google Search Central, updated 10 December 2025
[2]Build and submit a sitemap — Google Search Central, updated 8 July 2026
[3]Sitemaps XML format — sitemaps.org, updated 21 November 2016
[4]Manage your sitemaps with sitemap index files — Google Search Central, updated 10 December 2025
[5]Image sitemaps — Google Search Central, updated 10 December 2025
[6]Video sitemaps and alternatives — Google Search Central, updated 20 May 2026
[7]News sitemaps — Google Search Central, updated 10 December 2025
[8]Tell Google about localized versions of your page — Google Search Central, updated 21 September 2026
[9]Sitemaps report — Search Console Help, read 11 October 2026
[10]Sitemaps ping endpoint is going away — Google Search Central Blog (Gary Illyes), 26 June 2023
[11]AI features and your website — Google Search Central, updated 10 December 2025
[12]Keeping Content Discoverable with Sitemaps in AI Powered Search — Bing Webmaster Blog (Fabrice Canel, Krishna Madhavan), 31 July 2025
[13]The Importance of Setting the "lastmod" Tag in Your Sitemap — Bing Webmaster Blog (Fabrice Canel), 1 February 2023
[14]Overview of OpenAI crawlers — OpenAI, read 11 October 2026
[16]Perplexity Crawlers — Perplexity docs, read 11 October 2026
[17]Site map — Wikipedia, read 11 October 2026

Find out where you actually stand

One real question, real AI engines, and the answer they gave — including who was named in it. No account, no card.