XML Sitemaps

SEO, AEO & GEO Glossary

An XML sitemap is a machine-readable file listing a site's important canonical URLs, with optional last-modified dates, to help search engines crawl them.

What are XML Sitemaps?

An XML sitemap is a machine-readable file that lists the URLs on a website that the owner wants search engines to discover and crawl, optionally with the date each page was last modified. It follows the sitemaps.org protocol supported by Google, Bing and other engines. Sitemaps help discovery, especially on large or new sites, but do not guarantee indexing.

The protocol was introduced by Google in 2005 and adopted jointly by major search engines in 2006. It remains one of the simplest ways to tell crawlers which pages matter, alongside internal links.

How it works

A minimal sitemap looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/pricing</loc>
    <lastmod>2026-10-15</lastmod>
  </url>
</urlset>
flowchart LR
  A[CMS publishes or updates page] --> B[Sitemap regenerated with lastmod]
  B --> C[Referenced in robots.txt and submitted in Search Console / Bing]
  C --> D[Crawler fetches sitemap]
  D --> E[New or changed URLs prioritized for crawling]

Key rules:

  • Limits: up to 50,000 URLs or 50 MB uncompressed per file. Use a sitemap index file for more.
  • Absolute URLs on the same host (or verified cross-host setups).
  • Extensions exist for images, video, news and hreflang alternates.
  • Encoding: UTF-8, with special characters escaped.

Examples

  • A B2B SaaS company splits its sitemaps into product, blog, docs and glossary files. When Search Console shows that only a fraction of glossary URLs are indexed, the team knows to investigate content quality in that section specifically.
  • A cybersecurity research site publishes new advisories daily. Accurate lastmod values and an automatically regenerated sitemap help crawlers pick up new pages quickly, and IndexNow notifications cover Bing and other participating engines.

Best practices

  • Generate sitemaps automatically from your CMS or build process.
  • Keep lastmod truthful: update it only when content meaningfully changes.
  • Segment by page type for clearer indexing diagnostics.
  • Remove URLs that redirect, 404 or are noindexed.
  • Monitor the Sitemaps and Page indexing reports after major releases.

How to audit an XML sitemap

  1. Fetch the sitemap (or sitemap index) and confirm it returns 200 and valid XML.
  2. Crawl the listed URLs with a tool such as Screaming Frog in list mode and flag any that redirect, return errors or carry noindex.
  3. Compare the sitemap with a full site crawl to find important pages that are missing.
  4. Check Search Console’s Page indexing report filtered by sitemap to see why submitted URLs are not indexed.

Common mistakes

  • Setting every lastmod to the build date, which teaches crawlers to ignore it.
  • Including staging, parameter or non-canonical URLs.
  • Listing URLs blocked by robots.txt.
  • Forgetting to update sitemaps after a migration.

AI search features rely on crawled indexes such as Google’s and Bing’s, so faster discovery of new and updated pages helps fresh content become eligible for AI answers sooner. Some sites also publish an llms.txt file as a curated guide for AI tools, but it does not replace an XML sitemap.

Sources

Frequently asked questions

What should be included in an XML sitemap?

Only canonical URLs that return a 200 status, are indexable (no noindex) and that you want to appear in search. Leave out redirects, 404s, parameter variations, paginated duplicates you canonicalize elsewhere, and pages blocked by robots.txt.

Do priority and changefreq matter?

Not for Google, which has said it ignores both values. Google does use lastmod when it is consistently and verifiably accurate, for example when it reflects meaningful content changes rather than every page rebuild. Bing has also emphasized accurate lastmod values.

How do I submit an XML sitemap?

Add a Sitemap: line with the full sitemap URL to your robots.txt file, and submit it in the Sitemaps report in Google Search Console and in Bing Webmaster Tools. Both tools report fetch errors and how many submitted URLs are indexed.

Technical SEOCrawlingIndexing

Do not let AI keep
recommending someone else

Start your 7-day free trial and get your AI Visibility Score in about a minute. See exactly where you stand, where competitors are beating you, and the ranked fixes to get into the answer. Cancel anytime before the trial ends.

7-day free trial. Cancel anytime before it ends. Trusted by 500+ B2B SaaS teams.

Partnered with
Powered by