Free auditStart free
GlossaryGlossary · Crawling and indexing

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.

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 withChatGPTClaudePerplexityGoogleAI Mode
02Checklist

Limits and format rules

  1. 01Each 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. 02The file must be UTF-8 encoded, and special characters such as an ampersand must be entity-escaped (&).
  3. 03Google accepts XML, RSS or Atom feeds, and plain text files. XML is the most versatile for extra content such as images and video.
  4. 04Past the limit, split the URLs across several files and list them in a sitemap index (see the section on sitemap index files below).
04Check it

Make lastmod worth trusting

Google uses <lastmod> only when it's consistently and verifiably accurate, and counts changes to main content, 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
05Explained

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, 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), is comprehensively linked internally so 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.

06How 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. Documentation sites built with Docusaurus generate one through its sitemap plugin; see Docusaurus sitemaps. For the Search Console submission steps, use the sitemap submission guide.

  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.

07Checklist

Common mistakes

  1. 01Listing 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 when the same content is reachable at several URLs.
  2. 02Spending time on priority and changefreq. Google ignores both.
  3. 03Setting 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. 04Using relative URLs. Use fully-qualified absolute URLs.
  5. 05Treating “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. 01Build and submit a sitemap - Google Search Centraldevelopers.google.com · checked 2026-10-24
  2. 02What is a sitemap - Google Search Centraldevelopers.google.com · checked 2026-10-24
  3. 03Sitemaps XML format - sitemaps.orgsitemaps.org · checked 2026-10-24
  4. 04Manage large sitemaps (Google Search Central)developers.google.com · checked 2026-10-24
Questions

Asked a lot.

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

01What 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.

02How 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.

03Does a sitemap guarantee indexing?

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

04Does 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.

05Where should the sitemap live?

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

06Can 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.

Free · 2 minutes

Know the term. Now check your site.

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

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly