Skip to main content

What Is an XML Sitemap?

Filed under Core SEO Last reviewed: ← All glossary terms

Short answer

An XML sitemap is a file that lists the URLs on your site you want search engines to crawl, with an optional date showing when each one last changed. It helps crawlers find pages and notice updates, but it doesn't raise rankings or guarantee that a page gets indexed.

XML Sitemap explained

An XML sitemap is a machine-readable list of the pages a site owner wants crawled. It usually lives at yourdomain.com/sitemap.xml. You can point crawlers to it from robots.txt and submit it in Google Search Console. Large sites split it into several files tied together by a sitemap index.

What an XML sitemap looks like

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/services/</loc>
    <lastmod>2026-10-01</lastmod>
  </url>
</urlset>

Each <url> entry needs a <loc>, the page's full address. <lastmod> is optional and tells crawlers when the page last changed in a way that counts.

What Google actually uses

From Google's sitemap documentation:

  • One sitemap can hold up to 50,000 URLs or 50MB uncompressed. Bigger sites need more than one file.
  • Google ignores the <priority> and <changefreq> fields.
  • Google uses <lastmod> only when it's consistently accurate. Bumping it for a copyright-year change teaches Google to ignore it.
  • Submitting a sitemap is a hint. Google doesn't promise to crawl or index anything in it.

What belongs in it

Only canonical, indexable URLs that return a 200 status. Leave out redirects, 404s, noindexed pages, URLs blocked in robots.txt, and parameter or staging URLs. Every bad entry makes the file a less trustworthy guide.

Who needs one

Every site benefits, but sitemaps matter most for large sites, new sites with few inbound links, and sites where pages sit several clicks deep. A sitemap helps crawlers find pages. Internal linking is still how they judge which pages you consider important.

Check yours

  1. Open your sitemap URL and confirm it loads.
  2. In Search Console, open Sitemaps and compare submitted URLs with indexed URLs.
  3. Crawl the listed URLs and flag anything that doesn't return a 200 or points to a different canonical.

In practice

I check sitemaps on a schedule. The problems I find most often are sitemaps still listing deleted pages, staging URLs or redirect chains, and once, a sitemap that came out of a migration with no entries at all. My rule: the sitemap should match the site's own list of indexable pages, with honest lastmod dates. The gap between submitted and indexed counts in Search Console is the quickest health check there is.

Common misconception

A sitemap won't lift rankings or force a page into the index. When a listed page stays unindexed, the cause is usually quality, duplication or weak internal links, and the sitemap can't fix any of those.

Free email course: Smarter SEO for the Age of AI

Seven short lessons over three weeks: why clicks are falling even when rankings hold, and how to get AI systems to recommend your brand.

See what’s in the course

Tarun Gehani

Written and reviewed by Tarun Gehani

SEO and AI visibility consultant in Ann Arbor, Michigan, with 17+ years in SEO. He helps B2B SaaS companies, marketing teams and agencies show up in Google and in AI answers.