Look up robots.txt directives

Directives7 directives

User-agentCore

Specifies which crawler or bot the following rules apply to.

Syntax User-agent: *
Example User-agent: Googlebot

DisallowCore

Specifies paths that a crawler should not crawl.

Syntax Disallow: /private/
Example User-agent: *
Disallow: /admin/

AllowCore

Allows a specific path that would otherwise be blocked by a Disallow rule.

Syntax Allow: /public/
Example User-agent: *
Disallow: /assets/
Allow: /assets/images/

SitemapStandard

Provides the full URL of an XML sitemap to help crawlers discover URLs.

Syntax Sitemap: https://example.com/sitemap.xml
Example Sitemap: https://example.com/sitemap.xml

HostObsolete

Named the preferred domain (main mirror) for Yandex. Yandex stopped reading it in 2018 and Google never supported it: use a 301 redirect instead.

Syntax Host: example.com
Example Host: example.com

Crawl-delayNon-standard

Asks crawlers to wait a number of seconds between requests. Bing follows it; Google and Yandex ignore it.

Syntax Crawl-delay: 10
Example User-agent: *
Crawl-delay: 10

CommentsSyntax

Adds human-readable notes that crawlers ignore as directives.

Syntax # This is a comment
Example # Block private areas
User-agent: *
Disallow: /private/