Sub topic 2
Advisory conventions versus enforced controls
This chapter assumes you know how HTTP requests and responses work, can read a basic web server access log, and have a general idea of what AI crawlers and assistants are. It separates two kinds of mechanism that people often mix up: conventions that ask a client to behave, and controls that make a client behave. Every later chapter relies on this split.
The core distinction
An advisory convention is a published statement of your wishes. The client reads it, decides whether to follow it, and acts accordingly. Nothing on your server stops a client that ignores it. Examples are robots.txt, llms.txt, noarchive in X-Robots-Tag, and the TDM-Reservation header.
An enforced control is a check on your server or network that decides the outcome of each request. The client's cooperation is not needed. Examples are authentication, a firewall rule that blocks an IP range, rate limiting, and a web application firewall (WAF) rule that returns 403.
The test is simple. Ask what happens when the client does not cooperate. If your site still serves the content, the mechanism is advisory. If your site refuses, it is enforced.
| Property | Advisory convention | Enforced control |
|---|---|---|
| Who decides the outcome | The client | Your server or network |
| Cost to ignore it | None | The request fails |
| Works against bad actors | No | Yes, if well built |
| Typical examples | robots.txt, llms.txt, TDMRep | Login, WAF rule, rate limit, IP block |
| Main risk | False sense of protection | Blocking legitimate traffic by mistake |
| Setup effort | Edit a text file | Configuration, testing, monitoring |
Why advisory conventions exist at all
Advisory conventions work because most large operators want to be good citizens. A search company that crawls billions of pages needs site owners to tolerate it. Honoring robots.txt is cheap for the crawler, and it reduces complaints and legal exposure. The Robots Exclusion Protocol, first used in the 1990s and later published as RFC 9309, is a convention of this kind.
The arrangement holds under three conditions:
- The crawler operator is identifiable and has a reputation to protect.
- The operator publishes the user-agent token its crawler uses.
- The operator has decided, as policy, to read and follow the file.
When any condition fails, the convention fails. A scraper that sends a browser user-agent string and ignores robots.txt is not stopped by it. A small crawler that was never written to parse the file will not read it. A large operator might read a file but treat it as one input among several.
Seeing the difference in code
The Python standard library parser shows how an advisory rule works. A compliant crawler runs this check before fetching.
from urllib.robotparser import RobotFileParser
rules = """User-agent: GPTBot
Disallow: /
User-agent: *
Allow: /
""".splitlines()
rp = RobotFileParser()
rp.parse(rules)
for agent in ["GPTBot", "CCBot", "Googlebot"]:
print(agent, rp.can_fetch(agent, "https://example.com/docs/"))The output is GPTBot False, CCBot True and Googlebot True. Notice where the decision runs. The can_fetch call executes in the crawler's own process. Your server never sees it. A crawler can skip this call, and the next HTTP request will succeed unless something on the server stops it.
That is the whole difference. In an advisory system, the check happens on the client. In an enforced system, the check happens on the server.
The same rule, enforced
To enforce the same preference, you identify the request on the server and refuse it. This nginx fragment returns 403 for requests whose user-agent contains GPTBot.
map $http_user_agent $block_ai_bot {
default 0;
~*GPTBot 1;
}
server {
listen 80;
server_name example.com;
if ($block_ai_bot) {
return 403;
}
}This is stronger than robots.txt because the server decides. It is still weak, because it trusts the User-Agent header, and the client sets that header. A client that sends a different string passes through. The control is enforced, but its identification step is advisory. Chapter 13 covers how to verify that a request really comes from the operator it claims, using published IP ranges and reverse DNS.
Layers of enforcement strength
Enforcement is not all or nothing. Controls differ by how hard they are to evade.
| Control | What it relies on | How easy to evade |
|---|---|---|
| User-agent match | A header the client chooses | Trivial |
| IP range or ASN block | The network source of the request | Moderate. Clients can change networks |
| Verified bot check (IP ranges plus reverse DNS) | Operator-published network data | Hard for honest identification, but it only recognizes bots that cooperate |
| Rate limiting | Request behavior | Moderate. Distributed clients spread load |
| Authentication or paywall | A credential the client must hold | Hard |
Only authentication changes what an anonymous client can reach at all. The other measures are filters on top of public content. If a page must never reach an AI system, do not serve it publicly.
Where llms.txt sits
llms.txt is advisory, and it differs from robots.txt in a second way. robots.txt restricts: it tells a crawler what not to fetch. llms.txt only suggests: it lists pages you consider useful for an AI system. Ignoring it breaks no rule, and it has no way to stop anything. Later chapters examine what it can and cannot do. For this chapter the point is the category. An advisory file with no committed consumer is the weakest form of signal.
What each mechanism can express
Advisory conventions differ in what they communicate.
- Access preference. "Do not fetch this path." robots.txt does this.
- Usage preference. "You may fetch, but do not use the content for training." Content Signals and the IETF AI preferences work aim at this.
- Rights reservation. "I reserve text and data mining rights." TDMRep does this, and it is aimed at legal frameworks that recognize an opt-out.
- Content guidance. "These pages are the useful ones." llms.txt does this.
None of these makes the request fail. A usage preference is the hardest to verify, because fetching a page and training on it are separate acts, and the second leaves no trace in your logs.
Common errors
- Treating Disallow as security. robots.txt is a public file. Listing a private path in it advertises that the path exists. Protect private paths with authentication.
- Assuming a block works because you added a rule. A rule shows intent. It does not show behavior. Check your logs, as covered in Chapter 14.
- Blocking by user-agent and believing it is complete. The header is client-controlled. Combine it with verification if blocking is a hard requirement.
- Over-enforcing. A broad WAF rule can block search crawlers you want, monitoring services, or real users behind shared IP addresses. Test rules in log-only mode first when your tooling supports it.
- Mixing up purposes. Blocking a training crawler does not block a search crawler from the same company, and the reverse also holds. Each has its own token, covered in the next chapters.
Choosing between them
Use an advisory convention when three things are true: the content is fine to serve publicly, the operators you care about are known and reputable, and a miss is tolerable. This covers most decisions about AI search visibility and training preferences. The cost is a few lines in a text file.
Use enforcement when a miss has real cost: paid content, personal data, heavy server load, or contractual obligations. Enforcement costs more to set up and maintain, and it can cause false positives, so apply it to the narrow set of paths or clients that need it.
Many sites use both. They publish robots.txt for well-behaved crawlers and add rate limiting and bot verification for the rest.
Exercise
Your robots.txt contains "User-agent: *" and "Disallow: /internal/". A scraper with a browser user-agent string downloads pages under /internal/. Which kind of mechanism failed, and what would you change if those pages must stay private?
Show answer
The advisory mechanism failed. robots.txt depends on the client choosing to honor it, and this scraper did not. If the pages must stay private, put /internal/ behind authentication so the server refuses anonymous requests. Rate limiting or a WAF rule can reduce load, but only authentication changes who can read the content. Also note that listing /internal/ in robots.txt reveals the path to anyone who reads the file.
Exercise
The nginx example blocks requests whose user-agent contains GPTBot. Name one way it can fail and one way to make the identification stronger.
Show answer
It can fail because the client sets the User-Agent header, so a request that sends a different string passes through. To strengthen it, verify the source against the operator's published IP ranges, or use reverse DNS confirmation, so the check no longer depends on the header alone.