ai.txt generator

Write an ai.txt saying which files AI training may use.

FreeNo sign-upNothing to install

Which files may AI training datasets use?
Text and documents.txt .pdf .doc .docx .odt .rtf .md .html .htm
Images.jpg .jpeg .png .gif .webp .avif .svg .bmp .tiff .heic
Audio.mp3 .wav .flac .aac .ogg .m4a
Video.mp4 .mov .webm .avi .mkv
Code.py .js .ts .java .c .cpp .go .rs .rb .php
ai.txt
# ai.txt: permissions for AI training datasets
# Format: https://site.spawning.ai/spawning-ai-txt

User-Agent: *
Allow: *.txt
Allow: *.pdf
Allow: *.doc
Allow: *.docx
Allow: *.odt
Allow: *.rtf
Allow: *.md
Allow: *.html
Allow: *.htm
Disallow: *.jpg
Disallow: *.jpeg
Disallow: *.png
Disallow: *.gif
Disallow: *.webp
Disallow: *.avif
Disallow: *.svg
Disallow: *.bmp
Disallow: *.tiff
Disallow: *.heic
Disallow: *.mp3
Disallow: *.wav
Disallow: *.flac
Disallow: *.aac
Disallow: *.ogg
Disallow: *.m4a
Disallow: *.mp4
Disallow: *.mov
Disallow: *.webm
Disallow: *.avi
Disallow: *.mkv
Allow: *.py
Allow: *.js
Allow: *.ts
Allow: *.java
Allow: *.c
Allow: *.cpp
Allow: *.go
Allow: *.rs
Allow: *.rb
Allow: *.php

Upload it as /ai.txt at the root of your domain. ai.txt is read by tools that respect the Spawning format, such as the Do Not Train registry; it's a request, not a block. To stop AI crawlers from fetching pages at all, use robots.txt.

Built with atrby · Open live demo

What it does

ai.txt is a file format from Spawning, the company behind the Do Not Train registry. It sits at the root of your site and says which kinds of files AI training datasets may use.

It works by file type rather than by crawler. That makes it useful when you're fine with AI reading your articles but don't want your photos or recordings in a training set.

How to use it

  1. 1Under “Which files may AI training datasets use?”, set “Allow” or “Block” for Text and documents, Images, Audio, Video and Code. Images, audio and video start blocked.
  2. 2Check the file extensions listed under each type, so you know what each switch covers.
  3. 3Add “Your site (optional, for the comment line)” if you want your domain noted at the top.
  4. 4Press “Copy” or “Download” and upload the file as /ai.txt at the root of your domain.

ai.txt and robots.txt do different jobs

robots.txt asks crawlers not to fetch pages. ai.txt doesn't stop anything from fetching. It states what you allow for training, for tools that check it.

If you want to stop AI training crawlers like GPTBot, ClaudeBot or CCBot from collecting your pages, use robots.txt. ai.txt adds a statement about file types on top of that. Many sites use both.

What the file says

The output starts with a comment naming the format, then a “User-Agent: *” line and one Allow or Disallow line per file extension, such as “Disallow: *.jpg”. If you block every type, it writes a single “Disallow: /” instead.

Keep the file at the root, served as plain text. Change it whenever your policy changes; there's nothing to register.

Questions

Who reads ai.txt?

Tools that respect Spawning's format, such as its Do Not Train registry. It isn't a web standard, so don't rely on it alone. Pair it with robots.txt.

Is ai.txt legally binding?

It's a statement of your wishes, not a technical block or a contract. Whether it carries legal weight depends on where you are, so ask a lawyer if that matters to you.

Does ai.txt affect search engines?

No. Search crawlers don't use it. Your search visibility is set by robots.txt and your page tags.

Can I block only some images?

This generator works by file type across the whole site. For finer control, edit the output by hand or use robots.txt paths.

How do I see whether AI tools still visit?

Look for AI crawler user agents in your server logs. atrby tracks AI crawler visits and shows which AI assistants send visitors who buy.

More free tools

All 29 tools

Your site is tuned. Is the traffic paying?

atrby shows which sources, pages and AI assistants bring paying customers. Cookieless, from $19 a month.