Sub topic 12
TDMRep and ai.txt
This chapter covers two opt-out proposals that sit beside robots.txt: TDMRep, which is a published specification, and ai.txt, which is a looser family of ideas. It assumes you already know how robots.txt groups work, how HTTP response headers are set, and the difference between an advisory convention and an enforced control. The earlier chapters on those topics cover the background.
The problem these proposals address
robots.txt answers the question "may this crawler fetch this URL?" It does not say what a party may do with content after fetching it. A site owner might be happy for a search engine to index a page but not want the text used to train a model. Some publishers also need a signal that a legal system can recognise as a rights reservation, not just a crawl preference.
TDMRep and ai.txt both try to fill that gap. They differ a lot in maturity, in who defines them, and in who reads them.
Text and data mining in one paragraph
Text and data mining (TDM) means using automated analysis to extract patterns from large collections of text, images or other data. Training a machine-learning model on web pages is commonly treated as a form of TDM. Some jurisdictions have copyright exceptions that permit TDM, and in some of them, such as the European Union under Article 4 of the 2019 Copyright Directive, the exception for commercial use applies only if the rightsholder has not reserved their rights "in an appropriate manner", for example with machine-readable means for content made public online. TDMRep exists to provide such a machine-readable reservation.
Whether a particular signal counts as a valid reservation is a legal question that depends on jurisdiction and is still being tested. This chapter describes the technical mechanisms. It is not legal advice.
TDMRep
TDMRep (the TDM Reservation Protocol) is a specification published by a W3C Community Group. A community group report is not a W3C Recommendation, so it has less formal standing than HTML or HTTP. It defines a small set of fields that state whether TDM rights are reserved and, optionally, where a licence policy can be found.
The fields
| Field | Meaning |
|---|---|
| `tdm-reservation` | `1` means TDM rights are reserved. `0` means they are not reserved. |
| `tdm-policy` | A URL of a machine-readable policy that describes licensing terms. |
You can publish these fields in three places.
- HTTP response headers. The names appear as
TDM-ReservationandTDM-Policy. This works for any file type, including PDFs and images. - HTML meta elements. A
<meta name="tdm-reservation" content="1">element in the page head covers that HTML page. - A site-wide file. A JSON file at
/.well-known/tdmrep.jsonmaps URL path patterns to reservation values, so you can cover a whole site or sections of it without touching every response.
Header example
The header form is the easiest to test. This response reserves TDM rights and also sends a standard robots directive:
HTTP/1.1 200 OK
Content-Type: text/html
TDM-Reservation: 1
X-Robots-Tag: noarchiveThe two headers do different jobs. TDM-Reservation: 1 is a rights statement about mining. X-Robots-Tag: noarchive tells search engines not to show a cached copy. Neither stops a client from downloading the page.
Site-wide file example
The well-known file is a JSON array of rules. Each rule has a location path pattern and the fields above:
[
{
"location": "/",
"tdm-reservation": 1,
"tdm-policy": "https://example.com/policies/tdm.json"
},
{
"location": "/open-data/*",
"tdm-reservation": 0
}
]This reserves rights for the whole site and then exempts one section. Check the current specification for how overlapping rules are resolved before relying on a specific precedence, because that detail matters for exceptions like this one.
Checking your deployment
You can verify that headers are actually served with a short script. This uses only the standard library:
import urllib.request
req = urllib.request.Request("https://example.com/", method="HEAD")
with urllib.request.urlopen(req) as resp:
for name in ("TDM-Reservation", "TDM-Policy", "X-Robots-Tag"):
print(name, "=", resp.headers.get(name))A value of None means the header is missing. Run it against a few URL types (HTML, PDF, image), since a CDN or web server rule often applies headers to one content type but not another.
ai.txt
ai.txt is not one standard. The name has been used for several independent proposals, usually a plain-text file at the site root, modelled loosely on robots.txt, that states which kinds of AI use are allowed. Some versions use robots.txt-like syntax with per-file-type rules. Others are written in prose, or are tied to a specific vendor's tool.
Practical consequences:
- No single specification is widely recognised, so two sites that both publish "ai.txt" may use incompatible syntax.
- There is little public evidence that major AI crawlers fetch or honor it. You should not assume they do.
- Its main value today is as a human-readable statement of intent, and as an experiment you can measure with your own logs.
Treat ai.txt as a candidate for the evaluation checklist in the final chapter, not as a control.
Comparing the options
| Property | robots.txt | TDMRep | ai.txt |
|---|---|---|---|
| Question answered | May this crawler fetch this URL? | Are TDM rights reserved for this content? | Which AI uses are allowed (varies by proposal) |
| Where it lives | `/robots.txt` | Headers, meta tag, or `/.well-known/tdmrep.json` | Usually `/ai.txt` |
| Addresses a specific crawler | Yes, by user-agent token | No, applies to any miner | Varies |
| Specification status | IETF standard (RFC 9309) | W3C Community Group report | No single specification |
| Enforced by the protocol | No | No | No |
| Legal relevance | Indirect | Designed for the EU-style reservation | Unclear |
The key point in the table is the last-but-one row. All three are advisory. A client that ignores them is not blocked by anything in the protocol.
How the pieces fit together
TDMRep and robots.txt cover different layers. robots.txt controls access for named crawlers. TDMRep states a rights position that holds regardless of which program fetched the content, including a dataset assembled from an archive.
Only the enforcement branch can stop a determined client. The other branches rely on the consumer choosing to cooperate.
Common errors
- Assuming a header is a block.
TDM-Reservation: 1does not change what the server sends. A scraper receives the full page. - Setting the header on HTML only. PDFs, images and JSON endpoints often come from different server rules or from a CDN and miss the header.
- Contradicting yourself. Allowing a training crawler in robots.txt while reserving TDM rights in headers sends mixed signals. Decide the policy first, then express it consistently across layers.
- Treating ai.txt as equivalent to robots.txt. A file named ai.txt has no agreed meaning, and a crawler that does not look for it will never read it.
- Skipping the legal question. If you need the reservation to carry legal weight, check what your jurisdiction accepts as a valid machine-readable reservation, and consider including the terms in your site's terms of service as well.
- Forgetting that archives are copies. Content already collected before you added a reservation is generally not affected.
Deciding whether to use them
TDMRep is cheap to add if you already control response headers, and it is the more defensible choice when your concern is a rights reservation. ai.txt costs little to publish but has the weakest evidence of consumption. If blocking is a hard requirement, neither replaces the controls described in the enforcement chapter. You can measure whether anyone fetches /.well-known/tdmrep.json or /ai.txt using the same log search approach shown earlier for llms.txt.
Exercise
Your site sends TDM-Reservation: 1 on its HTML pages, but a log search shows a scraper downloaded every page last week. Does this mean TDMRep failed? What would you check next, and what would you change if you needed to stop the scraper?
Show answer
Not necessarily. TDMRep is advisory and records a rights reservation. It does not prevent downloads, so the scraper fetching pages is consistent with how the protocol works. Next, check whether the header was present on those responses (including non-HTML types), and whether the scraper identifies itself with a user-agent token that robots.txt rules could address. To actually stop it, use enforcement: verify or block the source by IP range or bot signature in the WAF, apply rate limits, or require authentication. Keep the TDMRep header as the rights statement.
Exercise
Name two differences between TDMRep and ai.txt in terms of specification status and where the signal can be placed.
Show answer
TDMRep has a published specification from a W3C Community Group, while ai.txt has no single agreed specification and the name covers several incompatible proposals. TDMRep can be placed in HTTP headers, HTML meta elements or a /.well-known/tdmrep.json file, while ai.txt is generally a single text file at the site root.