Multiple Sitemap directives in robots.txt
robots.txt can carry more than one Sitemap directive, and each is a full absolute URL pointing at a sitemap or sitemap index file. This is the standard way to advertise multiple sitemaps — by section, by media type, or by language — to every crawler at once. This page covers the syntax, ordering, and the sitemap-index alternative.
How multiple sitemaps work
The Sitemap directive is independent of user-agent groups: it applies globally and can appear multiple times anywhere in the file. Each line must be a full absolute URL, including scheme and host, because a sitemap can live on a different host or path than robots.txt.
Sitemap: https://example.com/sitemap-pages.xml Sitemap: https://example.com/sitemap-blog.xml Sitemap: https://example.com/sitemap-images.xml
Order does not imply priority. List as many as you need; there is no per-line dependency on the Disallow or Allow rules above or below them.
Sitemap index as an alternative
If you have many sitemaps, a single sitemap index file can reference all of them, letting you advertise just one URL in robots.txt:
Sitemap: https://example.com/sitemap-index.xml
The index then lists each child sitemap. Both approaches are valid; the index keeps robots.txt short and centralises sitemap management, while listing them directly makes the set visible in the robots file itself. Either way, also submit the sitemap (or index) in Search Console for richer reporting.
- Sitemap directive is global — not tied to any User-agent group
- Each line is a full absolute URL (scheme + host)
- A sitemap index can collapse many sitemaps into one advertised URL
How it appears in analytics and logs
Multiple Sitemap lines in robots.txt mean the site is publishing more than one sitemap for crawlers to discover. They are hints for discovery, not a guarantee that every listed URL is crawled or indexed.
Diagnostic use case
Advertise several sitemaps (or a sitemap index) to all crawlers from one place, so search engines discover every part of a large or multi-section site.
What WebmasterID can help detect
WebmasterID records which crawlers fetch your sitemap URLs and when, so you can confirm that each advertised sitemap is actually being picked up after you list it in robots.txt.
Common mistakes
- Using a relative path instead of a full absolute URL on a Sitemap line.
- Putting Sitemap inside a User-agent group expecting it to apply only to that crawler — it is always global.
- Listing sitemaps in robots.txt but never submitting them in Search Console for reporting.
Privacy and accuracy notes
Sitemap directives expose only public sitemap URLs, never visitor data. WebmasterID treats sitemap fetches by crawlers as bot events, separate from human analytics.
Related pages
- The Sitemap directive in robots.txt
The Sitemap directive points crawlers at your XML sitemap. It uses an absolute URL, can appear multiple times to list several sitemaps, and works independently of your allow/disallow rules — it is a discovery hint, not a crawl-permission rule.
- robots.txt and sitemap coordination
robots.txt and your XML sitemap work together: the Sitemap directive advertises your sitemap to crawlers, and Search Console submission gives Google a direct feed. The key is consistency — do not list URLs in a sitemap that your robots.txt disallows, or you send crawlers contradictory instructions.
- robots.txt basics: what it does and what it cannot do
robots.txt is a plain-text file at your site root that tells compliant crawlers which paths they may request. This page covers the directives, how user-agent groups are matched, and the limits that trip people up: robots.txt is advisory, it does not hide pages from search, and it is not a security boundary.
- Website observability
See which crawlers fetch your sitemaps and when.
Sources and verification notes
- Google — Sitemaps: submit via robots.txtMultiple Sitemap directives and sitemap index files are supported.
- sitemaps.org — Sitemap index protocol
Last reviewed 2026-06-24. Facts are checked against primary/official sources where available; uncertain specifics are marked “Data not yet verified” rather than guessed.