What Is an XML Sitemap? How It Helps Search Engines Crawl Your Site

An XML sitemap is a file, typically named sitemap.xml, that lists the URLs of a site along with optional metadata like last modification date — helping search engines discover pages, especially ones that might otherwise be hard to find through normal link-following. Google's documentation is clear that a sitemap is a hint about which pages exist and their relative structure, not a guarantee that every listed URL will be crawled or indexed.

Published: Sep 5, 2026 Last updated: Sep 5, 2026 Reviewed by: NOXEL Research Reading time: ~7 min Difficulty: Beginner → Intermediate Primary topic: Technical SEO

Definition

An XML sitemap follows the sitemaps.org protocol, a format supported by all major search engines, listing each URL a site wants search engines to know about. It's especially useful for large sites, new sites with few external links, sites with pages not well-linked internally, or sites with rich media/video content not easily discoverable by crawling alone. Established

Basic Format

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

The <loc> tag is required and specifies the full URL. <lastmod> is optional but recommended, indicating when the page was last significantly modified — Google's documentation notes this value should be accurate, since a sitemap with consistently incorrect lastmod dates may cause the field to be disregarded. Established

A Hint, Not a Crawl Guarantee

Submitting a sitemap does not guarantee every listed URL will be crawled or indexed. Google's documentation states plainly that a sitemap tells Google which pages the site owner considers important, but crawling and indexing decisions still depend on the usual factors — content quality, crawl budget, and technical accessibility of each page. Established

Submitting a Sitemap

Common Mistakes

FAQ

Does a sitemap guarantee my pages get indexed?

No. A sitemap helps search engines discover URLs, but indexing still depends on content quality, technical accessibility, and other normal ranking-adjacent factors.

Is lastmod required in a sitemap?

No, but it's recommended. Google's documentation notes the value should be accurate, since consistently incorrect dates can cause the field to be disregarded.

How many URLs can one sitemap file contain?

Up to 50,000 URLs or 50MB uncompressed per the sitemap protocol. Larger sites split URLs across multiple sitemap files referenced by a sitemap index.

Sources

  1. Google Search Central. "Build and Submit a Sitemap." developers.google.com
  2. sitemaps.org. "Sitemaps XML Format." sitemaps.org

← Back to Learn