Allow AI Search Crawlers and Decide on Training Bots: A robots.txt Guide for Trades Sites
Many trades sites block AI bots without the owner knowing, because a plugin or a template did it. This guide shows how to read your robots.txt, what Google says about the file and how to make a deliberate choice.
I am Robiul Alom Ronju, Founder of Nexranking. The facts below come from the pages linked in Sources. My own advice is marked as mine. This is not legal advice.

How Google reads robots.txt
Google says the file must be named robots.txt and sit at the top level of the host. It applies only to the exact host, protocol and port it is on. Google recognises user-agent, allow, disallow and sitemap, reads only the first 500 KiB, and typically caches the file for up to 24 hours.
Two kinds of AI bot
OpenAI and Anthropic each run separate robots for search, for training and for user requests, and each says the settings are independent. See OpenAI crawlers and Claude crawlers.
The decision
This is my own framework. Search and user-fetch bots help people find and read your business. Training bots decide whether your content may be used to train a model. A trades business that wants customers from AI answers usually allows the first group. The second is a policy choice.
Steps
- Open your live robots.txt in a browser.
- List every user-agent line and what it does.
- Check plugin settings for AI bot blocks.
- Edit the file or the plugin setting, not both at once.
- Keep a copy of the old file.
- Test a page with Google’s tools and check the file again after a day.
Common mistakes
A wildcard disallow can block everything. A rule copied from a staging site can leave the live site closed. A file in a subfolder is ignored. A comma-separated list of user agents on one line may not work as intended. Check each rule by name.
What robots.txt cannot do
It is a request, not a lock. Google’s file only controls crawling, not whether a URL can appear in results. For removing a page, see robots.txt versus noindex.
Write it down
Record who changed the file, when and why. A one-line note in your site log saves a lot of confusion if rankings or crawls change later.
A sample structure to adapt
This is my own sketch, not a rule. Keep the general User-agent star group for normal crawlers with only the paths you really need to hide, such as admin pages. Add named groups for any AI bot you want to treat differently. Put the Sitemap line at the end with the full URL. Keep comments in the file to say why each group exists. Test the file in a staging copy first if your host allows it.
When to ask for help
If the file is long, generated by a plugin or edited by several people, ask your developer to simplify it. A 500 KiB limit sounds large, but old plugins can add a lot of lines. A short file is easier to check, and a short file is much less likely to block something by accident.
A worked example
Illustrative example, not a client case. A roofer finds that his theme added a long AI-bot block. He deletes the lines for search bots, keeps one training bot blocked after reading the vendor’s page and sets a reminder to check the file after plugin updates.
Mistakes I see
- Blocking everything with a wildcard.
- Using the wrong file location.
- Editing in two places.
- No backup of the old file.
- Treating robots.txt as a security tool.
Next, read what Google says about llms.txt and ask for an audit.
Where must robots.txt live?
In the top-level directory of each host.
How long does Google cache it?
Typically up to 24 hours.
Are AI bots all the same?
No. Search, training and user-fetch bots are separate.
Is robots.txt a security measure?
No. It is a request that well-behaved crawlers follow.
Related guides
- llms.txt and Special AI Markup: What Google Says for Trades Websites
- IndexNow for Trades Websites: What It Is and What It Does Not Do
- Bing Webmaster Tools for Trades Websites: Import From Search Console in Minutes
Browse every guide in the local SEO guides for trades hub.
Sources
- Google Search Central, robots.txt specifications: https://developers.google.com/search/docs/crawling-indexing/robots/robots_txt
- OpenAI, Bots and crawlers: https://developers.openai.com/api/docs/bots
- Anthropic, Does Anthropic crawl data from the web?: https://support.claude.com/en/articles/8896518