# XML sitemap

> An XML sitemap lists the URLs you want search engines to find. Format, the 50,000 URL and 50MB limits, what Google ignores, and how to submit one.

Canonical: https://scaplet.com/glossary/xml-sitemap

Glossary Glossary · Crawling and indexing

An XML sitemap lists the URLs you want search engines to find. Format, the 50,000 URL and 50MB limits, what Google ignores, and how to submit one.

5 min

read

4

sources

Oct 24, 2026

updated

Scaplet Editorial Team

author

In one line

An XML sitemap is a file that lists the URLs on your site so search engines can discover them. Each sitemap is limited to 50,000 URLs or 50MB uncompressed. A sitemap helps discovery but doesn't guarantee crawling or indexing, and Google ignores the priority and changefreq values.

30-second check

## Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?

Summarize this page with [ChatGPT](https://chatgpt.com/?hints=search&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fxml-sitemap%20(%22XML%20sitemap%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Claude](https://claude.ai/new?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fxml-sitemap%20(%22XML%20sitemap%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [Perplexity](https://www.perplexity.ai/search?q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fxml-sitemap%20(%22XML%20sitemap%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.) [![Google](/logos/ai/google-color.svg)AI Mode](https://www.google.com/search?udm=50&q=Summarize%20https%3A%2F%2Fscaplet.com%2Fglossary%2Fxml-sitemap%20(%22XML%20sitemap%22)%20in%205%20bullet%20points%2C%20then%20tell%20me%20the%20one%20thing%20I%20should%20do%20next.)

On this page

## 7 parts, 5 minutes.

1. [What a sitemap contains 01](#what-a-sitemap-contains)
2. [Limits and format rules 02](#limits-and-format-rules)
3. [Sitemap index files: when you need one, limits and format 03](#sitemap-index-files-when-you-need-one-limits-and-format)
4. [Make lastmod worth trusting 04](#make-lastmod-worth-trusting)
5. [Do you need one? 05](#do-you-need-one)
6. [How to submit it 06](#how-to-submit-it)
7. [Common mistakes 07](#common-mistakes)

_01_At a glance

## What a sitemap contains

The sitemaps.org protocol requires a `<urlset>` element, a `<url>` entry for each URL, and a `<loc>` in every entry. The other tags are optional.

Tag

### `<loc>`

Required

Yes

What Google does with it

The URL. Use fully-qualified, absolute URLs

Tag

### `<lastmod>`

Required

No

What Google does with it

Used if it is consistently and verifiably accurate

Tag

### `<changefreq>`

Required

No

What Google does with it

Ignored by Google

Tag

### `<priority>`

Required

No

What Google does with it

Ignored by Google

A minimal sitemap

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

_02_Checklist

## Limits and format rules

1. 01 Each sitemap file can hold at most 50,000 URLs and be no larger than 50MB uncompressed. Both Google and sitemaps.org state these limits.
2. 02 The file must be UTF-8 encoded, and special characters such as an ampersand must be entity-escaped (`&amp;`).
3. 03 Google accepts XML, RSS or Atom feeds, and plain text files. XML is the most versatile for extra content such as images and video.
4. 04 Past the limit, split the URLs across several files and list them in a sitemap index (see the section on sitemap index files below).

_03_Limits for sitemaps and sitemap index files, labeled by source

## Sitemap index files: when you need one, limits and format

A sitemap index is an XML file that lists other sitemap files. You need one when your URLs outgrow a single sitemap (50,000 URLs or 50MB uncompressed), or when you want logical groups, such as products and articles, in separate files so you can inspect each in [Search Console](/glossary/google-search-console). Submit the index and Google processes the child files together.

Limit

### URLs per sitemap

Value

50,000

Source

Google, sitemaps.org

Limit

### Size per sitemap

Value

50MB uncompressed

Source

Google, sitemaps.org

Limit

### Entries per sitemap index file

Value

Up to 50,000 `<loc>` tags

Source

Google

Limit

### Sitemaps per index file

Value

Up to 50,000 sitemaps, and the index file itself no larger than 50MB

Source

sitemaps.org

Limit

### Index files per site in Search Console

Value

Up to 500

Source

Google

Limit

### Where child sitemaps can live

Value

Same site, in the index file's directory or lower. Google waives the same-site rule if you set up cross-site submission

Source

Google

The last row catches people out: an index at `/blog/sitemap_index.xml` can't list sitemaps in `/shop/` under the default path rules. Put the index at the site root, which also lets it reference sitemaps anywhere in the site hierarchy.

A sitemap index

```
<?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>https://example.com/sitemap-pages.xml</loc> </sitemap> <sitemap> <loc>https://example.com/sitemap-posts.xml</loc> </sitemap> </sitemapindex>
```

- Use the Sitemap protocol namespace and absolute, fully qualified URLs.
- Only list sitemap files, not page URLs. Page URLs belong in the child sitemap.
- If you add `<lastmod>` to an index entry, it describes when the sitemap file itself changed, not when every URL inside changed.
- Check each child file: it should load, stay below its size and URL limits, and list only the canonical URLs you want in search. Then submit the index URL in the [Search Console Sitemaps report](/glossary/sitemaps-report) and inspect its read status and errors.
- Common mistakes: pointing the index at another hostname or sibling directory without a supported cross-site setup, listing a child sitemap that is over its own limits, and submitting several overlapping indexes so it is unclear which file owns a URL.

_04_Check it

## Make lastmod worth trusting

Google uses `<lastmod>` only when it's consistently and verifiably accurate, and counts changes to main content, [structured data](/glossary/structured-data) or links. Updating a copyright year doesn't count. Set it from your content's real modified date, not the deploy time.

Count URLs and size before you hit a limit

```
curl -s https://example.com/sitemap.xml | grep -o '<loc>' | wc -l curl -s https://example.com/sitemap.xml | wc -c
```

_05_Explained

## Do you need one?

Google says a sitemap helps it discover URLs but doesn't guarantee that every listed item is crawled and indexed. Its overview lists the cases where a sitemap helps most: large sites, new sites with few [external links](/glossary/backlinks), and sites with a lot of video, image or news content. Google says you might not need one if your site is small (about 500 pages or fewer that you want in [search results](/glossary/serp)), is comprehensively linked internally so [Googlebot](/ai-crawlers/googlebot) can find every important page by following links, and doesn't have many video, image or news pages you want to show in search results. In most cases, Google says, a site benefits from having one.

_06_How it works

## How to submit it

Sitemap line in robots.txt

```
User-agent: * Disallow: Sitemap: https://example.com/sitemap.xml
```

If a hosted store uses different sitemap paths for different storefronts, see [BigCommerce sitemaps](/seo/bigcommerce/xml-sitemap). Documentation sites built with Docusaurus generate one through its sitemap plugin; see [Docusaurus sitemaps](/seo/docusaurus/xml-sitemap). For the Search Console submission steps, use the [sitemap submission guide](/seo/google-search-console/sitemap-submission).

1. 01

### Put it on your site

Host it at the root, for example `https://example.com/sitemap.xml`. Google says that, unless you submit it in Search Console, a sitemap affects only descendants of its parent directory.
2. 02

### Reference it in robots.txt

Add a line with the full URL: `Sitemap: https://example.com/sitemap.xml`.
3. 03

### Or submit it directly

Google accepts submission through the Search Console Sitemaps report or the Search Console API. Google says submitting a sitemap is merely a hint, and the Sitemaps report shows when Googlebot accessed it and any processing errors.

_07_Checklist

## Common mistakes

1. 01 Listing URLs you don't want in search results. Google says to include the URLs you want to see in its results, and to list your preferred [canonical URL](/glossary/canonical-url) when the same content is reachable at several URLs.
2. 02 Spending time on `priority` and `changefreq`. Google ignores both.
3. 03 Setting `lastmod` to the build time on every page. Google only uses it if it's consistently and verifiably accurate, so only change it when the page content changes.
4. 04 Using relative URLs. Use fully-qualified absolute URLs.
5. 05 Treating “submitted” as proof that URLs are indexed. Submitting a sitemap is a hint, so check indexing and canonical signals separately.

Sources · 4

## Every fact, linked and dated.

Official docs first. The date is when we last opened each page.

- google.com
- sitemaps.org

1. 01 [Build and submit a sitemap - Google Search Central](https://developers.google.com/search/docs/crawling-indexing/sitemaps/build-sitemap) developers.google.com · checked 2026-10-24
2. 02 [What is a sitemap - Google Search Central](https://developers.google.com/search/docs/crawling-indexing/sitemaps/overview) developers.google.com · checked 2026-10-24
3. 03 [Sitemaps XML format - sitemaps.org](https://www.sitemaps.org/protocol.html) sitemaps.org · checked 2026-10-24
4. 04 [Manage large sitemaps (Google Search Central)](https://developers.google.com/search/docs/crawling-indexing/sitemaps/large-sitemaps) developers.google.com · checked 2026-10-24

Questions

## Asked a lot.

6 questions people ask next, answered from the sources on this page.

_01_ What is the XML sitemap size limit?

50MB uncompressed or 50,000 URLs per file, whichever you reach first. Use a sitemap index to group more files.

_02_ How many sitemaps can a sitemap index contain?

Google documents a maximum of 50,000 `<loc>` entries in a sitemap index, and sitemaps.org says an index file is also limited to 50MB. Each referenced sitemap has its own limit of 50,000 URLs or 50MB uncompressed.

_03_ Does a sitemap guarantee indexing?

No. Google says a sitemap helps discovery but doesn't guarantee that every item will be crawled and indexed.

_04_ Does Google use priority and changefreq?

No. Google's documentation says it ignores `<priority>` and `<changefreq>`. It uses `<lastmod>` only if it is consistently and verifiably accurate.

_05_ Where should the sitemap live?

At the site root. Outside Search Console submission, a sitemap affects only the directory it sits in and below.

_06_ Can a sitemap index point to a sitemap on another domain?

By default, use the same site and directory rules. Google waives the same-site requirement if you set up cross-site submission, which its sitemap documentation covers separately.

## Keep learning

[All glossary](/glossary)

[Learn Google Search Console Crawling and indexing](/glossary/google-search-console) [Related robots.txt Crawling](/glossary/robots-txt) [Read next Bing Webmaster Tools Crawling and indexing](/glossary/bing-webmaster-tools) [Do Run a free site audit Free, about two minutes](/site-audit)

Nearby in glossary
[YMYL](/glossary/ymyl) [YouTube algorithm](/glossary/youtube-algorithm)

More in Crawling and indexing
[unavailable_after](/glossary/unavailable-after) [URL fragment](/glossary/url-fragment) [URL Inspection tool](/glossary/url-inspection-tool) [URL parameters](/glossary/url-parameters) [URL structure](/glossary/url-structure) [User agent](/glossary/user-agent) [Video sitemap](/glossary/video-sitemap) [Web crawler](/glossary/web-crawler) [Web scraping](/glossary/web-scraping) [www vs non-www](/glossary/www-vs-non-www) [X-Frame-Options](/glossary/x-frame-options) [X-Robots-Tag](/glossary/x-robots-tag) [XML sitemap](/glossary/xml-sitemap) [301 redirect](/glossary/301-redirect) [302 redirect](/glossary/302-redirect) [410 Gone](/glossary/410-gone) [A record (DNS address record)](/glossary/a-record) [Bing Webmaster Tools](/glossary/bing-webmaster-tools) [Bot management](/glossary/bot-management) [Broken links](/glossary/broken-links) [cache: search operator](/glossary/cache-search-operator) [Canonical HTTP header](/glossary/canonical-http-header) [Canonical URL](/glossary/canonical-url) [Client-side rendering](/glossary/client-side-rendering)

Terms on this page
[Google Search Console](/glossary/google-search-console) [Sitemaps report](/glossary/sitemaps-report) [Structured data](/glossary/structured-data) [Backlinks](/glossary/backlinks) [SERP](/glossary/serp) [Canonical URL](/glossary/canonical-url)

Free · 2 minutes

## Know the term. _Now check your site._

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

[Audit my site free](/site-audit)

Free, no card 60 seconds Nobody will call you

- **46** fixes shipped without a ticket Brightpipe
- **+212%** organic clicks in 90 days Ledgerly
