Sitemap Glossary

What is Sitemap Directive in robots.txt?

The Sitemap: line in a robots.txt file that tells crawlers where to find XML sitemaps.

Written by SitemapKit Editorial TeamUpdated: Jul 21, 2026

Key takeaways

  • Interpret Sitemap Directive in robots.txt in its sitemap XML context; the detailed definition below explains its role and constraints.
  • Validate Sitemap Directive in robots.txt against a real XML example instead of relying on the field or tag name alone.

The `Sitemap:` directive in robots.txt is a standardized way to tell search engine crawlers where to find a website's XML sitemaps. It's placed at the top or bottom of the robots.txt file and can appear multiple times for multiple sitemaps.

The directive is not tied to any `User-agent` block — it applies globally to all crawlers. The URL must be absolute (including protocol and domain).

This is the most reliable method of sitemap discovery because robots.txt is always the first file a search engine crawler checks when visiting a domain.

XML example

User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml
Sitemap: https://example.com/sitemap-news.xml

Continue with SitemapKit

Sources and further reading

Work with sitemaps programmatically

SitemapKit's API discovers and parses XML sitemaps into structured JSON, including fields such as Sitemap Directive in robots.txt.

Related terms