Table of contents
To add the __usage_ai-training token, put a separate User-Agent: __usage_ai-training group in whatever file or setting actually produces your robots.txt: a template on Shopify, an editor on Wix and Webflow, a filter or editor on WordPress, a source file on static site generators. Squarespace is the one platform in this guide where we found no documented way to add it. Every platform below can also break the file in the same way, by stacking the token on User-agent: *, so each section ends with the same check.
This is the where-to-type-it companion to our explainer on what the token means and how three parsers read it. We built the framework cases ourselves on 11 Nov 2026 and ran every generated file through two parsers.
Quick summary
| Platform | Where the group goes | Can you add it? | Source, read 11 Nov 2026 |
|---|---|---|---|
| WordPress | SEO plugin robots.txt editor, the robots_txt filter, or a physical robots.txt | Yes | WordPress do_robots() reference |
| Shopify | templates/robots.txt.liquid, after the default-groups loop | Yes, as an unsupported customization | Shopify developer docs |
| Wix | SEO & GEO > Tools and settings > Robots.txt Editor | Yes | Wix Help Center |
| Squarespace | Nowhere: only a "Block known artificial intelligence crawlers" checkbox | No | Squarespace Help Center |
| Webflow | Site settings > SEO > Indexing, robots.txt field | Yes | Webflow Help Center |
| Cloudflare (managed robots.txt on) | Your origin file. Cloudflare prepends its own block above it | Yes, at the origin | Cloudflare docs |
| Next.js | app/robots.ts as its own rule object, or a static app/robots.txt | Yes, tested on 16.4.6 | Next.js docs |
| Astro | public/robots.txt | Yes, tested on 7.4.10 | Astro project structure |
| Hugo | layouts/robots.txt with enableRobotsTXT = true, or static/robots.txt | Yes, tested on 0.169.0 | Hugo robots.txt templates |
| Docusaurus | static/robots.txt | Yes | Docusaurus static assets |
Short answer: whatever the platform, the group you add is the same four lines, it sits below your existing groups with a blank line above it, and any Allow: exception goes above the Disallow: it carves out. Then run npx aiscan-cli yoursite.com and confirm check B2 still passes.
The group you are adding, and the one mistake every platform allows
The Internet-Draft (version 00, read 11 Nov 2026) defines __usage_ai-training as a policy token. Google (30 Oct 2026) says it will support it in 2027; OpenAI says "in the coming months". It expresses a training preference and is not a crawl rule, so adding it today changes no crawler's behaviour, as long as it lives in its own group.
User-Agent: __usage_ai-training
Allow: /press-kit/
Disallow: /
Drop the Allow: line if you have no exception. Think of robots.txt groups like labelled envelopes: each User-agent line is a name on the envelope, and every rule inside goes to every name on it. RFC 9309 treats consecutive User-agent lines as one group. Write the token line directly under User-agent: * and the Disallow: / meant for training now tells Googlebot to leave too. Our pillar post measured that in three parsers; this post found a framework API that writes it for you (the Next.js section).
What our lab builds produced
On 11 Nov 2026 we built each framework case locally, with no network fetches of anyone else's site, and parsed the output with Python 3.11.18's urllib.robotparser and Protego 0.7.0 (the parser behind Scrapy). Four agents and two paths per file.
| Build | Token at / | Token at /press-kit/logo.png | Googlebot at / | GPTBot at / | Google-Extended at / | Both parsers agree? |
|---|---|---|---|---|---|---|
Next.js 16.4.6, app/robots.ts, token as its own rule object | no training | allowed | allowed | allowed | blocked (by design) | yes |
Next.js 16.4.6, userAgent: ['*', '__usage_ai-training'] | no training | no training | blocked | blocked | blocked | yes |
Astro 7.4.10, public/robots.txt | no training | allowed | allowed | allowed | allowed | yes |
Hugo 0.169.0, layouts/robots.txt template | no training | allowed | allowed | allowed | allowed | yes |
WordPress robots_txt filter (PHP 8.3.6, core output stubbed) | no training | allowed | allowed | allowed | allowed | yes |
| Cloudflare managed block prepended to an origin file with the token | no training | allowed | allowed | blocked (managed) | blocked (managed) | yes at /; no on a second * rule |
Three results matter. The Next.js array form, which looks like a tidy way to write "same rules for both", emits the token stacked on User-agent: * and blocks the whole site for every crawler. Astro copied public/robots.txt byte for byte (cmp reported no difference). And the Cloudflare case exposed an old parser gap that matters more on Cloudflare than anywhere else, covered in its section.
We also fetched the live robots.txt of our own four sites (aiscan.site, xspeedcache.com, storeseo.com, bettershield.ai) on 11 Nov 2026: none carries the token yet, and none shows a Cloudflare managed block.
WordPress
WordPress serves a virtual robots.txt built by do_robots() unless a real robots.txt file sits in your web root, in which case the web server sends that file and WordPress never runs. Find out which you have before editing: if your hosting file manager shows a robots.txt next to wp-config.php, edit that file.
Path 1: an SEO plugin editor (recommended). ThinkRank is the plugin we recommend here. It edits robots.txt, robots meta, llms.txt, schema and sitemaps from one place, so one plugin owns the file instead of two overwriting each other, and it migrates settings from Rank Math, Yoast, AIOSEO and SEOPress.
- Open the plugin's robots.txt editor.
- Scroll to the end of the existing content.
- Add a blank line, then the token group.
- Save, then fetch
https://yoursite.com/robots.txtand confirm the group is there.
Yoast SEO and Rank Math have robots.txt editors too, and the same four steps apply if one of them already runs your site. Use only one.
Path 2: the robots_txt filter (no plugin). WordPress passes the generated text and the "Search engine visibility" setting through the robots_txt filter. Put this in a small must-use plugin (wp-content/mu-plugins/ai-training-token.php) so a theme switch does not drop it:
<?php
add_filter( 'robots_txt', function ( $output, $public ) {
if ( ! $public ) {
return $output; // "Discourage search engines" is on: leave the file alone
}
$output .= "\nUser-Agent: __usage_ai-training\nAllow: /press-kit/\nDisallow: /\n";
return $output;
}, 20, 2 );
We ran this callback with PHP 8.3.6 against the core default output (User-agent: *, Disallow: /wp-admin/, Allow: /wp-admin/admin-ajax.php) using a stub in place of WordPress; the result parsed as expected. Priority 20 runs it after plugins that use the default 10. If an SEO plugin also writes robots.txt, this filter may append to its output or be replaced by it, so pick one path.
Path 3: a physical file. Upload a robots.txt to the web root with your full rules plus the group. This overrides every plugin and filter.
Shopify
Shopify generates robots.txt and lets you replace it with a theme template. Shopify calls this an "unsupported customization": its support team will not help with edits, and a bad file "can result in loss of all traffic".
- Save a copy of your current
https://yourstore.com/robots.txt. Shopify's developer docs ask for this, because the template's output "doesn't always match Shopify's generated" file. - From your Shopify admin, go to Online Store. For your live theme, click … > Edit code.
- Click Add a new template, select robots, then click Create template.
- Leave the Liquid loop over
robots.default_groupsas it is. Shopify's docs place custom groups outside that loop, so add the token group after the closing{% endfor %}, with a blank line before it. - Save, then compare the live file with your saved copy. Every default group should still be there.
Shopify's help center also notes that agentic storefronts such as ChatGPT receive product data through Shopify Catalog, "independently of /robots.txt", so this token does not reach that channel.
Wix
Wix maintains the file itself and regenerates its * group around your additions, which our Wix robots.txt post covered in detail.
- Open your Wix dashboard and select SEO & GEO.
- Under Tools and settings, click Robots.txt Editor.
- Click View File.
- Under This is your current file, add a blank line and the token group at the end.
- Click Save Changes, then Save.
If anything goes wrong, the same screen has Reset to Default.
Squarespace
Squarespace writes robots.txt for you and does not let you edit it, as we found when we set up a Squarespace site for AI agents. Its help article on AI models (read 11 Nov 2026) documents one control: Settings > Crawlers > Block known artificial intelligence crawlers, which adds a fixed list of named crawlers. We found no documented way to add a custom User-agent line, so the token cannot be added on Squarespace today. That checkbox blocks crawling by the listed bots, which is a stronger and different statement than a training preference. If you need the token specifically, ask Squarespace support for it.
Webflow
- Open Site settings > SEO > Indexing.
- In the robots.txt field, add a blank line and the token group after your existing rules.
- Save and publish the site.
Webflow's own examples write groups without blank lines. That works (a User-agent line after rules starts a new group), but blank lines make a stacked token easy to spot. The same page has Traffic control toggles that generate rules for groups of known bots; check the published file to make sure those and your group sit in separate groups.
Cloudflare
If you use Cloudflare's managed robots.txt, Cloudflare prepends its own block above your origin file whenever the origin answers 200, "combining both into a single response". The managed block shown in Cloudflare's docs on 11 Nov 2026 contained a Content-signal line and named crawler groups, and no __usage_ai-training line. So the token goes in your origin file, wherever that file comes from (one of the other sections here). See our Cloudflare AI Crawl Control setup guide for the dashboard side.
The combined file has two User-agent: * groups: Cloudflare's, then yours. RFC 9309 §2.2.1 says groups matching the same agent are combined. Protego did that. Python's urllib.robotparser used only the first * group, so an origin rule Disallow: /lp was ignored for Googlebot (urllib: allowed; Protego: blocked). The token group itself parsed correctly in both. To verify on Cloudflare:
- Fetch the served file:
curl -s https://yoursite.com/robots.txt > served.txt. - Fetch the origin file directly, bypassing Cloudflare, into
origin.txt. - Run
diff origin.txt served.txt. The only difference should be the managed block at the top; your token group should appear once, below# END Cloudflare Managed Content.
Next.js
Path 1: a static file. Put a plain app/robots.txt in the app directory with the token group in it. Next.js serves it as written.
Path 2: app/robots.ts. The userAgent field is typed string | string[], so the token string type-checks. Give it its own rule object:
import type { MetadataRoute } from 'next'
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{ userAgent: '*', allow: '/' },
{ userAgent: 'Google-Extended', disallow: '/' },
{ userAgent: '__usage_ai-training', allow: '/press-kit/', disallow: '/' },
],
sitemap: 'https://example.com/sitemap.xml',
}
}
next build on 16.4.6 prerendered this as a static route and wrote each object as a separate group, Allow above Disallow. Do not write userAgent: ['*', '__usage_ai-training'] with one disallow: '/': the build emitted both User-Agent lines over a single Disallow: /, and both parsers then blocked every crawler from the whole site. The array form is fine for crawlers that should share rules; never put the token in an array with * or with a crawler you want to keep.
Astro
Astro copies everything in public/ to the build output unprocessed.
- Create or open
public/robots.txt. - Add a blank line and the token group below your crawler groups.
- Run
astro buildand confirmdist/robots.txtis unchanged from the source.
If you generate robots.txt from an endpoint or an integration instead, add the group there and check the built file.
Hugo
With enableRobotsTXT = true, Hugo's built-in template writes only User-agent: * (that was the full output of our 0.169.0 build). To add the token:
- Keep
enableRobotsTXT = trueinhugo.toml. - Create
layouts/robots.txtwith your groups, the token group andSitemap: {{ "sitemap.xml" | absURL }}. - Run
hugoand readpublic/robots.txt.
Our template produced exactly the groups we wrote, with the sitemap resolved to the site's baseURL. A plain static/robots.txt with enableRobotsTXT left off also works.
Docusaurus
Docusaurus copies every file in static/ "into the root of the generated build folder". Add the token group to static/robots.txt (create it if missing), run the build, and check build/robots.txt. Our Docusaurus robots.txt post covers the crawler groups that usually sit above it.
Verify the edit: AIScan first, then a parser
The fastest check is a scan: run npx aiscan-cli yoursite.com or paste the address at aiscan.site. It is free and needs no account. Read three results:
- B2 (explicit AI bot rules) passes when your file names at least four of the sixteen AI crawlers on AIScan's watchlist. The training token is not on that watchlist. If B2 was passing yesterday and fails after your edit, a crawler group got merged with the token or deleted.
- B1 (Content Signals) is informational and only reports a
Content-Signalline. The token and that line are independent; having one does not satisfy the other. - The file itself has to come back as HTTP 200 with
text/plain, or crawlers ignore all of it (robots.txt status and content type explains the failure modes).
The rubric for each is on /docs/checks/bot-access. What AIScan cannot see: whether Google or OpenAI has read your preference, because neither had shipped support on 11 Nov 2026.
For a manual check, ask Python whether Googlebot may still fetch your homepage:
python3 -c "import urllib.robotparser as r; p=r.RobotFileParser('https://yoursite.com/robots.txt'); p.read(); print(p.can_fetch('Googlebot','https://yoursite.com/'))"
True is the pass. False straight after this edit is the stacked-token mistake, a modern route to a robots.txt that blocks the whole site. To read the training preference itself rather than crawl access, use the spec-aware checker in the token explainer.
Mistakes by platform
| Platform | Mistake | What happens | Fix |
|---|---|---|---|
| Next.js | userAgent: ['*', '__usage_ai-training'] | Whole site blocked for all crawlers (lab, 2 of 2 parsers) | One rule object per group |
| Any editor | Token line typed under User-agent: * | Same as above | Blank line, then the token on its own |
| WordPress | Filter plus SEO plugin editor | One overwrites the other | Pick one path |
| Shopify | Token placed inside the default_groups loop | Repeated under every default group | Put it after {% endfor %} |
| Cloudflare | Expecting the managed block to add the token | It does not (docs read 11 Nov 2026) | Add it at the origin |
| Hugo | Only enableRobotsTXT = true | File contains User-agent: * and nothing else | Add layouts/robots.txt |
| Any | Disallow: / above Allow: /press-kit/ | First-match parsers ignore the exception | Allow: first |
Your next step
Find the platform section that matches how your robots.txt is produced, add the group, then run npx aiscan-cli yoursite.com and confirm B2 still passes. For the crawler groups themselves, start from our robots.txt starter for AI crawlers; for the other signals that state how AI may use your content, see how to declare your content-use policy to AI. Every other guide is at /guides.
Frequently asked questions
I added the token in Next.js app/robots.ts and now Search Console says my whole site is blocked. Why?
You probably put the token in an array with '', for example userAgent: ['', '__usage_ai-training'] with disallow: '/'. On Next.js 16.4.6 that builds one group with both User-Agent lines, so the Disallow applies to every crawler. Give the token its own rule object and rebuild.
After editing robots.txt.liquid on Shopify, some of Shopify's default rules disappeared. What happened?
The template replaces Shopify's generated file, so anything not output by the Liquid loop over robots.default_groups is gone. Restore the loop exactly as Shopify documents it and add the token group after the closing endfor, then compare the live file with the copy you saved first.
My WordPress robots_txt filter does nothing. Why is the token missing from robots.txt?
A physical robots.txt file in the web root is served directly by the web server, so WordPress never runs the filter. An SEO plugin that writes its own file can also replace the output. Delete the physical file or add the group to it, and keep only one tool in charge of robots.txt.
My token group shows up twice on a Cloudflare site. Is that a problem?
Check whether you added it at the origin and in a Cloudflare rule or Worker as well. The managed robots.txt only prepends Cloudflare's own block, which had no token line in Cloudflare's docs on 11 Nov 2026, so one copy at the origin is enough. Remove the other copy.
Can I add the __usage_ai-training token on Squarespace?
Not as of 11 Nov 2026. Squarespace does not let you edit robots.txt, and its only documented AI control is the Block known artificial intelligence crawlers checkbox, which blocks named crawlers rather than stating a training preference.
Where should the token group go in the file?
Below your existing crawler groups, with a blank line above it, and never on the line directly under User-agent: * or another crawler name. Put any Allow exception above the Disallow it narrows so first-match parsers read it correctly.
Does Hugo add the token if I set enableRobotsTXT = true?
No. Hugo 0.169.0's built-in template writes only User-agent: *. You need your own layouts/robots.txt template, or a static/robots.txt file with enableRobotsTXT left off.
Will adding the token change my AIScan score?
No. Check B2 counts named AI crawlers and the token is not one of them. Re-run the scan anyway: if B2 drops after the edit, a crawler group was merged with the token or removed.

About the author
M Asif Rahman
Entrepreneur, curious about AI
I have been building companies for a long time, and lately most of my curiosity goes to AI. AIScan is a small personal project I built on a flight from Dubai to Narita. I use it to understand how ready the web is for AI agents, and I share what the scans teach me.
Related guides
Content Signals in robots.txt: 117 of 799 Sites Declare One
Of 799 sites in our scan database on 2 November 2026, 117 serve a robots.txt with a ContentSignal line 14.6%. Among the 677 sites that serve a usable robots.txt at all, that is 17.3%. Another 682…
AI readiness setup guide by platform (2026)
Verified 17, 18, 20 and 22 October 2026. Updated on 22 October 2026. An AIready site needs six things: a robots.txt that names AI crawlers D1, B2, a sitemap D2, a declared feed E5, an llms.txt C2,…
llms.txt vs robots.txt vs sitemap.xml in 2026: Six Files, Six Jobs
Verified 4 September 2026. Every figure below was measured or fetched on that date. Three files keep getting compared as if they were competing for the same job: robots.txt, sitemap.xml and llms.txt.…
