Developer Tools

sitemap.xml explained: what to include, the 50,000 URL limit and HTML sitemaps

A sitemap is a list of pages you want search engines to find. It does not guarantee ranking, but it helps new and deep pages get discovered. This guide covers the tags that matter, the limits, the mistakes that waste crawl time and how an HTML sitemap helps real visitors.

By the Toolcloak team9 October 20263 min read
In this article
  1. How a sitemap fits into crawling
  2. What a sitemap file looks like
  3. The size limits
  4. What to include and what to leave out
  5. Where to put it and how to announce it
  6. XML sitemap versus HTML sitemap
  7. Quick checklist

Search engines find pages by following links. That works well for pages linked from your home page, and poorly for new pages, deep pages or pages nobody has linked yet. A sitemap.xml file hands the crawler a clean list of the addresses you want found, along with when each last changed.

How a sitemap fits into crawling

From file to search results
  1. 1You publish /sitemap.xmlThe file sits at the root of your site, for example example.com/sitemap.xml.
  2. 2You tell crawlersAdd a Sitemap: line to robots.txt and submit the file in Google Search Console and Bing Webmaster Tools.
  3. 3The crawler reads itIt queues the listed URLs and notes the lastmod dates.
  4. 4Pages are fetchedEach page is checked for quality, redirects, blocks and duplicate content.
  5. 5Good pages are indexedOnly some listed pages will be indexed. The sitemap is a request, not an order.

Many sites have thousands of pages listed but far fewer indexed. The gap is a quality signal worth investigating.

Paste your URLs, set dates and download a ready-to-upload sitemap.xml.Open Sitemap XML Generator

What a sitemap file looks like

A sitemap is plain XML. It starts with a urlset wrapper, and each page sits in its own url block. Only loc is required.

TagRequired?What it holdsDoes Google use it?
locYesThe full page address, including https://Yes
lastmodNoThe date the page last changed in a meaningful way, e.g. 2026-10-09Yes, when it proves accurate
changefreqNoA hint such as daily or monthlyNo, ignored
priorityNoA number from 0.0 to 1.0No, ignored

Do not set lastmod to today on every build. If the date changes without the content changing, search engines learn to ignore it.

The size limits

One sitemap file may contain at most 50,000 URLs and be at most 50 MB uncompressed. The URL count is usually the limit you hit first. Go beyond it and you split the list into several files, then list those files in a sitemap index.

A 120,000-page site split into sitemap files
URLs in the file
sitemap-1.xml
50,000
50,000
sitemap-2.xml
50,000
50,000
sitemap-3.xml
20,000
20,000

A small sitemap-index.xml then lists the three files. Submit only the index.

How many sitemap files for different site sizes
1800 pages150k pages3120k pages10500k pages402M pages

Files needed = pages ÷ 50,000, rounded up. Many large sites split by section (blog, products) rather than by count, which makes problems easier to trace.

What to include and what to leave out

A simple rule: list only pages you would be happy to see in search
IncludeCanonical, indexable pages that return 200: articles, tools, category pages, key landing pages.
Leave outPages with noindex, redirects (3xx), errors (404, 500) and duplicate versions of the same page.
Also leave outLogin, cart, internal search results, filters and tracking-parameter URLs.
Keep consistentUse the same version everywhere: https, one host name and either trailing slashes or none.

A sitemap full of redirected or blocked URLs wastes crawl attention and makes reports noisy.

Healthy sitemap against messy sitemap
MessyHurts more than helps
  • Includes 404 and redirected URLs
  • Mixes http and https, www and non-www
  • lastmod changes on every deploy
HealthyEasy to trust
  • Only live, canonical pages
  • One consistent address format
  • lastmod changes only when content does

Search engines build trust in a sitemap over time. Accurate files get read more attentively.

Where to put it and how to announce it

  1. Save it at the site root as /sitemap.xml. A sitemap can only list URLs at or below its own folder.
  2. Add one line to robots.txt: Sitemap: https://yourdomain.com/sitemap.xml (use the full address).
  3. Submit it in Google Search Console and Bing Webmaster Tools, under Sitemaps.
  4. Check the report. Look for 'discovered' versus 'indexed' counts and any errors.
  5. Regenerate on change. New pages should appear automatically; this is easy if your build creates the file.

XML sitemap versus HTML sitemap

Two things with the same name
XML sitemapFor crawlers
  • File at /sitemap.xml
  • Lists every important URL with dates
  • Not meant to be read by people
HTML sitemapFor visitors
  • A normal page, such as /site-map
  • Links to sections, tools and articles
  • Helps people who are lost and also gives crawlers more links

Use both. The XML file feeds search engines; the HTML page helps humans and adds internal links.

A good HTML sitemap groups links by topic, stays readable (a few hundred links at most on one page) and is linked from the footer of every page. It also helps with accessibility, since it is a reliable second way to navigate.

Quick checklist

  1. Every URL is absolute, starts with https:// and uses the same host.
  2. Each page returns 200, has no noindex and points to itself as canonical.
  3. The file is UTF-8 and the special characters in addresses are properly escaped.
  4. The file is under 50,000 URLs and 50 MB, or split with an index.
  5. robots.txt points to the sitemap and the sitemap is submitted in Search Console.

Questions people ask

What is a sitemap.xml?

It is an XML file listing the URLs of a website that you want search engines to discover, optionally with the date each page last changed. It usually lives at /sitemap.xml.

Do I need a sitemap for a small website?

Not strictly, since a well-linked small site is easily crawled. A sitemap still helps new pages appear sooner and gives you indexing reports, so it is worth having.

How many URLs can a sitemap hold?

Up to 50,000 URLs and 50 MB uncompressed per file. Larger sites use several sitemap files listed in a sitemap index file.

Does Google use priority and changefreq?

No. Google ignores both. It reads the loc tag and uses lastmod when the dates have proved reliable.

What is the difference between an HTML and an XML sitemap?

An XML sitemap is a machine-readable file for search engines. An HTML sitemap is a normal web page with links for human visitors, and it also adds internal links for crawlers.

How do I tell search engines about my sitemap?

Add a Sitemap line with the full address to robots.txt and submit the file in Google Search Console and Bing Webmaster Tools.