AI

How to Stop Google and OpenAI from Training AI on Your Website: A Step-by-Step Guide to robots.txt

How to Stop Google and OpenAI from Training AI on Your Website: A Step-by-Step Guide to robots.txt

The company Google, along with OpenAI, Anthropic and Microsoft, on October 31, 2026 announced that it would honor a new directive in the robots.txt file, allowing website owners to control whether their content is used to train generative AI.

Previously, webmasters had to manually track each individual crawler and define unique rules for each developer. The new solution is based on the IETF (draft-kelley-aipref-training-preference-signal-00), proposed by Kevin Kelley of Anthropic. This standard introduces a unified machine-readable policy token recognized by leading AI companies.

Best of all, Google says that blocking AI training in robots.txt will not affect your site's indexing in its search engine.


The Future of robots.txt: How a Unified Opt-Out Signal for Generative AI Training Works

  • Unified policy token (__usage_ai-training): Instead of multiple separate rules, a single block is created with the user agent User-Agent: __usage_ai-training.
  • Separation of search and AI training: The directive specifically governs data collection for training generative models, but does not block indexing for search results. For example, Google interprets this token as a stop signal specifically for the bot Google-Extended (responsible for training Gemini models), without affecting the site's visibility in Google Search.
  • Wildcard exception *: Wildcard bypass rule User-Agent: * does not apply automatically to the token __usage_ai-training, so it must be specified explicitly.
  • No retroactive effect: This setting will prevent future scraping but will not remove content that companies have already collected.
  • Implementation timeline: Anthropic has already begun supporting the new signal. OpenAI plans to implement it in the coming months, Google promises full support in early 2027, and Microsoft will support it starting February 1, 2027.

How to prevent AI from training on your website. A step-by-step guide to configuring robots.txt

Step 1. Open the file robots.txt

Open the existing file robots.txt in a text editor, or create a new file in your website's root directory (for example, [suspicious link removed]).

Step 2. Add the policy token __usage_ai-training

Specify the new universal token as the user agent:

User-Agent: __usage_ai-training

Step 3. Set blocking or permission rules

  • Completely prohibit the use of website content for AI training:
User-Agent: __usage_ai-training
Disallow: /
  • Selectively allow specific sections (for example, if you want to allow training on content from the press section):
User-Agent: __usage_ai-training
Disallow: /
Allow: /press-kit/

Step 4. Check compatibility with standard search bots

Content usage rules work independently of crawling rules. Make sure that major search engine bots (for example, Googlebot) continue to have access to the site for standard indexing if you want to maintain your search rankings.

Step 5. Save and upload the file

Save the changes to the file robots.txt and make sure it is accessible via your website's public URL.


  • If you have any questions or want to prevent AI from training on your website, contact me.

Comments0

Enter the code

Code sent to . If the email doesn't arrive within a few minutes, check your Spam and Promotions folders.

I want a comment system like this for my website

Read also

Have an idea for a project?

Tell me what you want to create. I'll help you shape the idea and launch it.

Message me