Blog

llms.txt and AI crawlers: what to allow and block in robots.txt

AI services send two kinds of crawler: answer crawlers, which read a page to write an answer to a question, and training crawlers, which collect pages to train a model. The starting point is to let answer crawlers in and to decide on training crawlers by the site's own policy.

6 min readpublish.link

How do answer crawlers and training crawlers differ?

An answer crawler reads a page when a user asks an AI service a question, uses it in the answer and links to it as a source. Block it, and that service cannot read the site when it writes an answer.

A training crawler collects material for the next AI model. Block it, and the next model will not know the site. If you do not want your content used for training, blocking it is a fair choice.

ServiceAnswer crawlersTraining crawlers
ChatGPTOAI-SearchBot, ChatGPT-UserGPTBot
ClaudeClaude-SearchBot, Claude-UserClaudeBot
PerplexityPerplexityBot, Perplexity-User—
Google—Google-Extended
Apple—Applebot-Extended
Amazon—Amazonbot
Meta—meta-externalagent
Common Crawl—CCBot

The table lists the names the publish.link site check looks for. Services can change or add crawlers, so check each service's own documentation before you make changes.

In the check, AI answer crawlers allowed is worth 9 points and AI training crawlers allowed 3 points. Blocking training crawlers is a fair choice, so it weighs less.

How do I write robots.txt?

robots.txt is the file that says, for each crawler name (User-agent), where it may read (Allow) and where it may not (Disallow). It sits at the site root.

When a group names a crawler, that crawler follows only its own group instead of the asterisk (*) group. In the example below, answer crawlers follow the asterisk group and are let in, while the 7 training crawlers are kept out.

User-agent: *
Allow: /
Disallow: /admin

User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: Amazonbot
User-agent: meta-externalagent
User-agent: CCBot
Disallow: /

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

If you decide to let training crawlers in as well, delete the middle group. The last line, Sitemap, tells crawlers where the sitemap is; without it the check marks robots.txt as needing a look.

What should I check if I use Cloudflare?

Cloudflare can serve its own block of rules in front of the site's robots.txt. That block is not in the file the site uploaded, so AI crawlers can be blocked without the operator knowing.

Open your site's /robots.txt in a browser. If there is a line that reads BEGIN Cloudflare Managed content, the rules after it were added by Cloudflare. You change them in the AI bot settings of the Cloudflare dashboard, not in the file.

The publish.link site check reads the robots.txt the site actually serves, so when it finds that line it notes Cloudflare managed robots.txt on the AI training crawlers item.

What is llms.txt, and why have one?

llms.txt is a guide file in Markdown that sits at the site root. It says what the site is and where its main pages are, in a form AI reads easily. Where robots.txt says what may be read, llms.txt says what is worth reading first.

llms.txt is a proposed format, and not every AI service has said it reads the file. It takes little effort to write and works as a map for an AI seeing the site for the first time, so there is nothing to lose by having one.

The check counts the file as present when /llms.txt opens and starts with a # heading. It passes when there is at least 1 link in the [name](address) form. Add the site in the console and you get a draft llms.txt made from the front page's menu, the sitemap and the feed.

How do I write llms.txt?

At the top, put the site name after # and a one-line introduction after >. Below that, list links under ## headings in the form [name](address): description. Here is an example for a publisher's site.

# Example News

> News on the economy and technology from the Example News desk.

## Sections

- [Economy](https://example.com/economy): markets, rates and companies
- [Technology](https://example.com/tech): AI, devices and the web

## About

- [About us](https://example.com/about): who runs the site and how to reach it
- [Corrections](https://example.com/corrections): how errors are fixed

## Optional

- [Sitemap](https://example.com/sitemap.xml)
- [Feed](https://example.com/rss.xml)

publish.link keeps an llms.txt in the same form, at https://publish.link/llms.txt.

In short

  • Let the 6 answer crawlers in (OAI-SearchBot, ChatGPT-User, Claude-SearchBot, Claude-User, PerplexityBot, Perplexity-User).
  • Decide the site's policy on training crawlers, then let them in or keep them out.
  • If you use Cloudflare, open the robots.txt the site actually serves and check it.
  • Add a Sitemap line to robots.txt.
  • Write the site's introduction and links to its main pages in llms.txt.

How does your site score?

Enter an address and we check up to 62 items, SEO, AEO and GEO among them, and score the site out of 100. The score shows right away, with no sign-up.