XML sitemap

The Citead team, updated

In short. An XML sitemap communicates page URLs and optional modification dates to search engine crawlers using the Sitemaps protocol.

Definition: An XML sitemap is a machine-readable file that lists page URLs for search engine crawlers. The Sitemaps protocol defines its XML structure and optional information, including the date a page was last modified.

Key facts

  • The Sitemaps protocol requires UTF-8 encoding and a <loc> element containing the page URL inside each <url> entry.
  • The protocol's file limits are 50,000 URLs and 50 MB per uncompressed sitemap. Larger collections require multiple files.
  • As of 17 October 2026, Google's sitemap guidance says Google ignores <priority> and <changefreq>, and uses <lastmod> when it is consistently accurate and verifiable.
  • Google's sitemap introduction identifies large sites and new sites with few external links as situations where a sitemap may help crawling.

What does an XML sitemap contain?

The Sitemaps XML format uses a <urlset> container with a namespace identifying the protocol. Each <url> contains a required <loc>; other fields are optional. A namespace identifies the XML vocabulary used by the file.

This example follows Google's basic XML sitemap example, including its sample URL and modification date:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/foo.html</loc>
    <lastmod>2022-06-04</lastmod>
  </url>
</urlset>

The protocol's date definition ties <lastmod> to the linked page's modification date. Generating the sitemap alone is not a reason to change that value. Its entity-escaping rules require an ampersand within a URL to appear as &amp; in the XML.

Which URLs belong in the file?

A canonical URL is the preferred address for content accessible through multiple URLs. Google's creation guidance recommends listing that preferred address. URLs must be complete, including the protocol and hostname.

For a site exceeding the file limits, the Sitemaps protocol defines a sitemap index: an XML file listing the locations of individual sitemap files. Compression is permitted, but the size limit applies after decompression.

How is a sitemap submitted and checked?

Google's submission instructions allow submission through the Sitemaps report in Search Console, Google's site monitoring service. The report shows when Googlebot accesses the file and identifies potential processing errors. Submission is a hint for Google's crawling systems.

The same instructions provide this line for robots.txt, the site's crawler instruction file:

Sitemap: https://example.com/my_sitemap.xml

The URL points to the sitemap file. Google reads this reference when it next crawls robots.txt.

Google's AI features documentation requires a page to be indexed and eligible for a search snippet before it can appear as a supporting link in AI Overviews or AI Mode, Google's AI search features. The sitemap's role is to communicate URLs for crawling, as described in Google's sitemap introduction. Indexing eligibility remains a separate requirement.

FAQ

Does a small website need an XML sitemap?

Google's sitemap introduction says you might not need one for a site of about 500 pages or fewer, with comprehensive internal links and few media or news pages. Its guidance counts pages intended for search results toward that total.

What should the last modification date represent?

Google's XML guidance associates <lastmod> with a significant page update, such as a change to the main content or structured data. A copyright date change alone falls outside its examples of significant updates.

Sources

  1. sitemaps.org, "Sitemaps XML format", 21 November 2016
  2. Google Search Central, "Build and submit a sitemap", 8 July 2026
  3. Google Search Central, "Learn about sitemaps", 10 December 2025
  4. Google Search Central, "AI features and your website", 10 December 2025

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark