Contact

What is XML Sitemap?

Definition

An XML sitemap is a file that lists the URLs on a site you want search engines to find, optionally with the date each was last modified, in a machine-readable format defined by the sitemaps.org protocol. It helps crawlers discover pages, especially on new, large or poorly linked sites, but it does not guarantee that any listed URL will be crawled or indexed.

Also known as: sitemap.xml, sitemap, XML site map

Diagram of an XML sitemap whose loc and lastmod entries tell the crawler which URLs to discover and which to crawl first

What a sitemap is for

Search engines find most pages by following links. A sitemap is a second discovery channel: a tidy list that says "these addresses exist on this site, and this is when they last changed". It helps most on sites with many pages, new sites with few external links, and sites that update often. On a small, well-linked site its effect is modest, but it does no harm.

A sitemap is a hint, not an instruction. Google does not guarantee that it will download a submitted sitemap or crawl the URLs in it, and being listed does not mean being indexed.

File structure

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/services/web-design/</loc>
    <lastmod>2026-09-14</lastmod>
  </url>
  <url>
    <loc>https://example.com/blog/what-is-seo/</loc>
    <lastmod>2026-08-30</lastmod>
  </url>
</urlset>

The file must be UTF-8 encoded and use fully qualified, absolute URLs (https://example.com/blog/what-is-seo/, not /blog/what-is-seo/). A single sitemap may contain up to 50,000 URLs and must not exceed 50 MB uncompressed. Larger sites split their URLs across several sitemaps and list them in a sitemap index file (sitemapindex).

Which tags Google uses

TagHow Google treats it
locRequired; the page URL
lastmodUsed if it is consistently and verifiably accurate
changefreqIgnored
priorityIgnored

Update lastmod only when something meaningful changes, such as the main content, structured data or links. A sitemap that bumps every date daily, or refreshes dates because the copyright year changed, teaches Google to stop trusting the signal.

Which URLs belong in it

  • Only URLs that return 200, that you want indexed, and that are canonical.
  • Leave out redirected, 404, noindex and parameter-duplicate URLs; including them sends mixed signals.
  • On multilingual sites, language alternatives can also be declared inside the sitemap with hreflang.

A sitemap can help Google find orphan pages that no other page links to, but it does not fix them. If an important page gets no internal links, the internal linking is what needs work.

Telling Google about it

  1. Submit it in the Sitemaps report in Search Console, which also shows processing status and errors.
  2. Add a Sitemap: https://example.com/sitemap.xml line to robots.txt; this also works for other search engines.
  3. If you manage many sites, use the Search Console API.

Google's old sitemap "ping" endpoint was deprecated in 2023, so these are the current methods. The full protocol is defined at sitemaps.org.

Related terms

← Back to the glossary