CrawlPact

Implementation guide

robots.txt syntax basics for AI crawler tokens

How User-agent groups, Allow, Disallow, and Sitemap directives are evaluated, and where AI crawler tokens fit in.

By CrawlPactPublished

robots.txt is a plain-text file at the root of a domain (/robots.txt) made up of one or more User-agent groups, each containing Allow and Disallow directives, plus optional Sitemap declarations.

Group matching

A crawler matches the most specific User-agent group that names its token exactly; if no exact match exists, it falls back to the wildcard (User-agent: *) group. Within a matching group, the longest matching path rule wins when Allow and Disallow rules conflict for the same path — this is the RFC 9309 behaviour CrawlPact’s parser follows (see /methodology).

Adding an AI-specific rule

User-agent: GPTBot
Disallow: /

This creates a dedicated group for a single crawler token without affecting the wildcard group that other, unlisted crawlers fall back to. CrawlPact’s recommendation engine generates rules in this shape, preserving unrelated existing directives.

Related guides

See how this applies to your own site

Run a free audit to check your declared AI crawler policy against your own domain.

Analytics preferences

CrawlPact uses optional Google Analytics and Microsoft Clarity on public pages to learn which content is useful. Clarity records clicks and scrolling (session replay), with anything you type masked. Neither runs in the app or admin areas, and CrawlPact works the same whether you accept or decline. See the privacy policy.