What Is a Sitemap? XML Sitemaps, Limits and How to Submit One

A practical glossary guide to sitemaps: the seven types, the tags Google uses and ignores, the size limits, and how to create and submit the file.

Table of contents

What Is a Sitemap? XML Sitemaps, Limits and How to Submit One — Web Tonic blog thumbnail

A sitemap is a file that lists the important URLs on a website so search engines can discover and crawl them efficiently. The standard format is XML, published at a stable address such as /sitemap.xml, and it tells engines like Google which pages exist, when each one last changed, and how the site is organised.

Key Takeaways

  • A single sitemap file is capped at 50,000 URLs or 50MB uncompressed (52,428,800 bytes). Beyond that you split the file and group the parts with a sitemap index.
  • A sitemap index can itself reference up to 50,000 child sitemaps, so the protocol scales to 2.5 billion URLs in theory.
  • Google ignores 2 of the 4 optional URL tags: <priority> and <changefreq> are not used. <lastmod> is used only when it is consistently and verifiably accurate.
  • News sitemaps are limited to 1,000 news:news entries per file — the tightest limit in the spec.
  • A sitemap is a discovery aid, not an indexing guarantee. It helps most on sites over roughly 500 pages, on new sites with few backlinks, and on sites with weak internal linking.
  • You only need 2 submission steps: add a Sitemap: line to robots.txt and submit the URL once in Google Search Console.
Developer at a desk reviewing XML sitemap code on a large monitor in a softly lit office

How a sitemap works

Search engines find pages in two ways: by following links, and by reading files you hand them. A sitemap is the second route. When a crawler fetches your sitemap file it gets a clean, machine-readable inventory of URLs without having to traverse your navigation, which means orphan pages, deep pagination and recently published content all become discoverable in a single request. Google's own documentation on what sitemaps do is explicit that a sitemap improves discovery, not ranking.

The minimum viable XML sitemap is short. Every file opens with an XML declaration, wraps everything in a urlset element bound to the sitemaps.org 0.9 namespace, and lists one url block per page:

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

All tag values must be entity-escaped, which is the single most common cause of an invalid sitemap file: an unescaped ampersand in a query-string URL breaks the whole document. The full schema, including entity-escaping rules and the alternative plain-text and RSS formats, lives in the sitemaps.org protocol specification, which Google, Bing, Yahoo and other engines all implement.

The 7 types of sitemap

"Sitemap" covers several different files that solve different problems. The distinction that trips people up most is XML versus HTML: an XML sitemap is for crawlers, an HTML sitemap is a page for humans.

TypeAudienceWhat it containsWhen you need it
XML sitemapSearch engine crawlersPage URLs plus optional lastmodAlmost always — this is the default
Sitemap index fileCrawlersA list of other sitemap filesOver 50,000 URLs or multiple content types
Image sitemapGoogle Imagesimage:loc entries per pageImage-led sites where images load via script
Video sitemapGoogle video resultsThumbnail, duration, descriptionSelf-hosted video libraries
News sitemapGoogle NewsPublication name and date, max 1,000 entriesPublishers accepted into Google News
HTML sitemapHuman visitorsA linked directory page of key URLsLarge sites with complex navigation
TXT or RSS sitemapCrawlersOne URL per line, or a feed of recent itemsSimple sites, or fast discovery of new posts

Extensions are additive rather than exclusive. You can declare image and video namespaces inside a normal URL sitemap instead of maintaining separate files, which is what most content management systems do. Google documents the specific tag sets for image sitemaps, video sitemaps and news sitemaps separately, and each has its own required child elements.

Row of server racks with blue and green status lights in a clean data centre aisle

Which sitemap.xml tags Google actually uses

The protocol defines four optional tags per URL. Google uses one of them. Cleaning the other three out of a generated sitemap will not help your rankings, but understanding the asymmetry stops teams wasting sprints tuning values that are discarded on arrival.

TagPurpose in the specGoogle's treatmentPractical advice
locThe canonical URL of the pageRequired and usedOne absolute URL, fully entity-escaped
lastmodDate the page last meaningfully changedUsed if consistently and verifiably accurateNever bump it on cosmetic edits
changefreqExpected update cadenceIgnoredSafe to omit entirely
priorityRelative importance from 0.0 to 1.0IgnoredSafe to omit entirely
sitemapindex / sitemapGroups multiple sitemap filesUsedUp to 50,000 child loc tags per index

A trustworthy lastmod is the highest-leverage field in the file. Google cross-checks the value against what it sees when it crawls, so a site that stamps every URL with today's date teaches the crawler to ignore the signal on every URL. Google's guidance on building and submitting a sitemap spells out both the size limits and the escaping requirements, and the sitemap index reference covers the grouping syntax for large sites.

Do you actually need a sitemap? By site type

A sitemap has the most impact where link-based discovery is weakest. If your site is small and every page is one or two clicks from the homepage, Google will find everything anyway — but publishing the file costs nothing and gives you an indexing report you would not otherwise have.

Site typeTypical URL countSitemap valueRecommended setup
Brochure site5-20Low but worth itSingle auto-generated XML file
Local service business20-150MediumOne file, location pages listed explicitly
Content blog150-2,000HighIndex file split by post type
Ecommerce store1,000-500,000CriticalIndex plus product, category and image children
Marketplace100,000+CriticalSharded index, hourly regeneration
News publisherContinuousCriticalNews sitemap capped at 1,000 items plus main XML
SaaS product site50-500HighSeparate docs and marketing sitemaps
Single-page app10-200CriticalServer-rendered routes listed manually
Video library100-10,000HighVideo sitemap with thumbnails and duration
Photography or portfolio50-2,000HighImage sitemap or image namespace
Job board or listings5,000-100,000CriticalFrequent regeneration, accurate lastmod
Multilingual siteAnyHighOne sitemap per language, hreflang in the file
Sticky notes and hand-drawn boxes connected by marker lines mapping a website structure on glass

How to create a sitemap in 5 steps

  1. Step 1 — Choose the source of truth. Most platforms generate the file automatically: WordPress ships core sitemaps and the Yoast SEO plugin's XML sitemap module replaces them with a configurable index; Shopify, Squarespace and Webflow publish one at /sitemap.xml with no setup. Only hand-build a file if you have a custom stack.
  2. Step 2 — Include only indexable, canonical URLs. Every entry should return a 200 status, be self-canonical, and not be blocked by robots.txt or a noindex tag. Mixed signals are the number one reason Search Console reports a URL as excluded.
  3. Step 3 — Split at the limits. Break the file before it reaches 50,000 URLs or 50MB, gzip the parts if bandwidth matters, and reference them from a single index file. Splitting by content type rather than arbitrarily makes the coverage report far easier to read.
  4. Step 4 — Validate before shipping. Run the file through an XML sitemap validator, confirm the namespace is correct, and check that a random sample of 20 URLs resolves without redirects.
  5. Step 5 — Automate regeneration. A sitemap that goes stale is worse than none, because inaccurate lastmod values devalue the whole file. Regenerate on publish, not on a weekly schedule.

How to submit a sitemap to search engines

Two mechanisms cover every major engine. The first is the Sitemap directive in robots.txt, which is read by every crawler that respects the exclusion protocol standardised in RFC 9309. Add one line per sitemap or index file, using an absolute URL — Google's robots.txt reference documents the syntax:

User-agent: *
Allow: /
Sitemap: https://example.com/sitemap_index.xml

The second is direct submission. In Google Search Console, open the Sitemaps report, paste the path and submit; the report then shows discovered URL counts and parse errors per file, which is the fastest diagnostic you have. Google's Sitemaps report help page explains each status. For Microsoft properties, Bing accepts the same file through Bing Webmaster Tools and additionally supports IndexNow, a push protocol that notifies engines the moment a URL changes rather than waiting for the next crawl. Running both is standard practice for our web development builds.

SEO analyst reviewing a search analytics dashboard on a laptop beside a notebook at a bright desk

8 sitemap mistakes that quietly cost indexing

MistakeWhy it hurtsFix
Listing noindexed URLsContradictory signals waste crawl budgetExclude anything not meant to rank
Including redirectsCrawler spends 2 requests per URLList destination URLs only
Faking lastmodGoogle learns to ignore the field site-wideStamp only on real content changes
Unescaped ampersandsThe entire file fails to parseEntity-escape every value
Mixing protocols or hostsCross-domain URLs are droppedOne host per file, matching the sitemap's own host
Blocking the sitemap in robots.txtThe file can never be fetchedAllow the path explicitly
Exceeding the 50,000 URL capEverything past the limit is ignoredShard and use an index file
Submitting once and forgettingErrors go unnoticed for monthsReview the Sitemaps report monthly

The pattern behind all eight is the same: a sitemap is a statement about which URLs you consider canonical and current. When that statement disagrees with your robots.txt, canonical tags or HTTP responses, the engine trusts the page over the file — and you lose the discovery benefit you built it for. Auditing that agreement across a large site is exactly the kind of work our data intelligence team automates, and we cover related technical fixes across the Web Tonic blog.

Related terms

TermDefinitionRelationship to sitemaps
CrawlingSearch engines fetching pages to read their contentSitemaps feed the crawl queue
IndexingStoring a crawled page as a ranking candidateNever guaranteed by a sitemap
robots.txtA file that permits or blocks crawler accessHosts the Sitemap directive
Canonical URLThe preferred version of duplicate pagesOnly canonicals belong in a sitemap
Crawl budgetRequests an engine will spend on your siteClean sitemaps reduce wasted requests
Orphan pageA page with no internal links pointing to itThe main discovery gap a sitemap closes
Google Search ConsoleGoogle's site owner reporting toolWhere you submit and monitor sitemaps
Sitemap validatorA tool that checks XML against the schemaRun before every submission

FAQ

What is a sitemap in simple terms?

It is a list of your website's important pages, written in a format search engines can read. The standard XML version sits at a fixed URL such as /sitemap.xml and tells Google which pages exist and when they last changed, so those pages get crawled sooner than they would through link discovery alone.

Do sitemaps improve SEO rankings?

Not directly. A sitemap affects discovery and crawl efficiency, not ranking position. The indirect benefit is real though: pages that get crawled and indexed faster start earning impressions sooner, and the Search Console Sitemaps report surfaces indexing problems you would otherwise miss.

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

An XML sitemap is a machine-readable file for search engine crawlers, written to the sitemaps.org schema. An HTML sitemap is a normal web page listing links for human visitors. Large sites sometimes publish both; only the XML version is submitted to Google.

How many URLs can one sitemap contain?

Up to 50,000 URLs, and no more than 50MB uncompressed per file. Files may be gzipped for transfer but must stay under 50MB once expanded. If you need more, create multiple sitemaps and list them in a sitemap index, which itself accepts up to 50,000 entries.

Where should a sitemap file be located?

At the root of the host it covers, most commonly /sitemap.xml or /sitemap_index.xml. A sitemap can only list URLs on the same host unless you prove ownership of the other host through its robots.txt, which is why cross-domain entries are usually dropped.

How do I know my sitemap is working?

Check the Sitemaps report in Google Search Console: it shows the last read date, the number of discovered URLs and any parse errors. Compare discovered URLs against indexed pages in the Pages report — a large gap points to quality or canonicalisation issues rather than a sitemap problem. Ask our team for a technical crawl audit if the gap will not close.

Sources: Google Search Central documentation — sitemaps overview, build and submit a sitemap, sitemap index files, image sitemaps, video sitemaps, news sitemaps and the robots.txt reference; sitemaps.org XML protocol 0.9; Google Search Console Sitemaps report help; RFC 9309 (Robots Exclusion Protocol); Yoast SEO XML sitemap documentation; Bing IndexNow. Last reviewed August 2026.

Author

Head of SEO

Reviewer

Founder & CEO

Book your strategy call today!
Schedule a call
Schedule a call
Discover our services
Our services
Our services