Guides/XML Sitemap Guide: Format, Limits and Common Mistakes
Guide

XML Sitemaps: What They Do, the Limits, and How to Get Them Right

An XML sitemap can hold up to 50,000 URLs or 50 MB. Google reads lastmod only if it is consistently accurate and ignores priority and changefreq entirely.

A single XML sitemap holds up to 50,000 URLs or 50 MB uncompressed, whichever comes first, and past that you split across multiple files under a sitemap index. Google reads <lastmod> only when it is consistently accurate, and it ignores <priority> and <changefreq> completely. A sitemap is a discovery aid, not a ranking lever — its one job is to tell Google which URLs you consider canonical and worth crawling.

What a sitemap does, and what it does not

A sitemap lists the URLs you want Google to know about. It helps discovery on large sites, on sites with poor internal linking, on new sites with few inbound links, and for content Google would otherwise struggle to reach. It is a hint about which URLs matter to you.

It is not a guarantee of crawling or indexing. Listing a URL does not force Google to crawl it, and crawling does not force indexing. A sitemap also does not override other signals: if a URL is noindex, blocked by robots.txt, or canonicalized elsewhere, its presence in the sitemap will not change that outcome. Treat the sitemap as one input among many, aligned with your canonicals and internal links.

Format

The XML format is simple. Each <url> entry needs a <loc>; everything else is optional.

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

Requirements: UTF-8 encoding, absolute URLs in <loc>, and URL-encoding of any special characters. Google also accepts RSS 2.0 and Atom 1.0 feeds (useful for recently changed URLs) and a plain-text file of one URL per line, but XML is the fullest format and the one to default to.

The 50,000-URL and 50 MB limits

A single sitemap file may contain at most 50,000 URLs and must be at most 50 MB uncompressed. Either ceiling can bind first — a site with long URLs or many optional tags can hit 50 MB well before 50,000 entries. Gzip compression is supported and reduces transfer size, but the 50 MB limit is measured uncompressed, so it does not raise the ceiling.

Sitemap index files

When you exceed a single file's limits, split your URLs across multiple sitemaps and list those sitemaps in a sitemap index. The index is itself capped at 50,000 sitemaps and 50 MB.

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

Splitting by content type — products, articles, categories — also makes Search Console's per-sitemap indexing counts more diagnostic, because you can see which section indexes well and which does not.

lastmod, priority and changefreq

This is where most sitemaps waste effort.

Populating priority and changefreq is harmless but pointless; accurate lastmod is the only per-URL hint that pays off.

Declaring and submitting your sitemap

There are two supported ways to tell Google where the sitemap lives:

  1. A Sitemap: line in robots.txt. Any crawler that reads your robots.txt discovers it, so this is the low-effort baseline:

    Sitemap: https://www.example.com/sitemap.xml
    

    Details on robots.txt structure are in our robots.txt guide.

  2. Search Console's Sitemaps report, or the Search Console API sitemaps.submit. This is the authoritative route for Google: it reports how many listed URLs were discovered and indexed, and surfaces parse errors.

Note that the old unauthenticated sitemap ping endpoint was deprecated in June 2023 and now returns 404. If any of your tooling still calls google.com/ping?sitemap=…, remove it — submit via Search Console or declare in robots.txt instead.

Common mistakes

A sitemap should list only canonical, indexable URLs that return 200. Every one of these mistakes weakens the file's signal:

The unifying principle: the sitemap is your statement of "these are the URLs I want indexed." Every non-indexable, non-200, or redirected entry undercuts that statement and can waste crawl budget on URLs Google then has to reject — see our crawl budget guide for how that waste compounds on large sites.

How Crawlinx detects sitemap problems

During the crawl Crawlinx ingests your sitemap and cross-references every listed URL against what it actually finds: URLs carrying noindex (sitemap.non_indexable), URLs that do not return 200 including redirects (sitemap.not_200), and crawlable pages that are both orphaned and absent from the sitemap (sitemap.orphan_not_listed). These run within the broader technical SEO audit checklist.

Takeaway

Keep sitemaps to 50,000 URLs and 50 MB per file, split larger sites under a sitemap index, and list only canonical, indexable, 200-returning URLs. Set lastmod accurately or not at all, and delete priority and changefreq — Google ignores both. Declare the sitemap in robots.txt and submit it in Search Console; skip the dead ping endpoint.

Related
Crawl Budget: What It Is and How to Manage It Robots.txt Guide: How Robots.txt Works Canonical Tags Guide: rel=canonical Explained Technical SEO Audit Checklist sitemap.non_indexable sitemap.not_200 sitemap.orphan_not_listed

Audit your own site — free

77 checks, internal PageRank, render-diff. No signup, results in ~30s.

Scan your site →