What does this robots.txt generator do?
It builds a robots.txt file that lets you decide, bot by bot, which AI crawlers may read your site. Each crawler sits in one of four groups: search engines, AI search, AI training and user-triggered fetchers. You switch each one on or off, add your sitemap URL, and copy the result. The WordPress site option adds the rules WordPress itself uses.
How do you use it?
- Choose a preset: allow all, block AI training only, or block all AI.
- Adjust individual bots with the toggles. The note under each bot explains what blocking it does.
- Keep “WordPress site” ticked if your site runs WordPress.
- Add any extra paths to block, one per line. Each path starts with
/. A full address is cut down to its path. - Enter your sitemap URL, for example
https://yourdomain.com/wp-sitemap.xmlor the sitemap index from your SEO plugin. - Copy the file and replace the contents of
/robots.txtat the root of your domain.
Which AI crawlers should you block?
Blocking is a trade-off. Training bots take content to build models and send no visitors. Search bots decide whether your pages can be cited and linked in AI answers. For most businesses that want leads, the sensible default is allow search, decide on training. Few of Pakistan’s most visited websites block any AI crawler at all; our study of AI crawler blocking on the top 200 .pk websites has the numbers.
| Group | Bots | If you block them |
|---|---|---|
| Search engines | Googlebot, Bingbot, Applebot | You disappear from normal search. Almost never block. |
| AI search | OAI-SearchBot, Claude-SearchBot, PerplexityBot, DuckAssistBot, Amzn-SearchBot | Your pages are less likely to be cited in ChatGPT, Claude, Perplexity or DuckDuckGo answers. |
| AI training | GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot, Bytespider, meta-externalagent, Amazonbot | You ask companies not to use your content for model training. Search visibility is not affected. |
| User fetchers | ChatGPT-User, Claude-User, Perplexity-User, meta-externalfetcher, Amzn-User | The assistant may refuse to open your page when a user pastes your link. Several of these state they may ignore robots.txt. |
Two control tokens are easy to misread. Google-Extended does not crawl and does not affect Google Search; Google says it controls use of content for Gemini training and grounding only. AI Overviews and AI Mode are part of Search, and Google states on its AI features page that Googlebot rules and snippet controls are the way to manage them. Applebot-Extended works the same way for Apple.
How do robots.txt rules work?
The format is defined in RFC 9309. The rules that matter most:
- One group per bot. A crawler follows the group whose
User-agentmatches its name. It ignores the*group if a named group exists. So a bot with its own group does not inherit your WordPress rules from*. - Longest match wins. When an
Allowand aDisallowboth match a URL, the rule with the longer path applies. If they are the same length,Allowwins. - Paths are case sensitive. Bot names are not.
- Wildcards.
*matches any characters and$marks the end of a URL. - It is a request, not a lock. The RFC says the rules are not a form of access authorization. Polite crawlers follow them; others may not.
- Caching. Crawlers should not cache the file for more than 24 hours, so changes take up to a day. DuckDuckGo states 72 hours for DuckAssistBot.
How do you test a URL?
Open Test a URL below the rules. Type a path such as /blog/my-post/ or a full address, choose a crawler, and the tool says whether that crawler is allowed or blocked. It also names the rule that decided the answer and the line it sits on.
- Pick the crawler. Choose “any crawler” to test the
*group, or “Custom crawler name” for a bot that is not in the list. - Read the verdict. The result shows which group applied and the deciding rule.
- To check a file you already have, tick Test my own robots.txt and paste it in. The same rules apply, so you can check the live file before you upload a new one.
The test follows RFC 9309. The most specific group for the crawler is used, and the * group applies when the crawler has no group of its own. Among the rules that match the path, the longest one wins. If an Allow and a Disallow are the same length, Allow wins. A * matches any characters, and a $ at the end marks the end of the address. For example, Disallow: /*.pdf$ blocks /files/a.pdf but not /files/a.pdf?x=1.
The test runs in your browser and does not fetch your live robots.txt. Paste the text yourself, and check the host separately, because each host has its own file.
What does WordPress put in robots.txt by default?
If there is no physical robots.txt file, WordPress serves a virtual one from do_robots(). Since WordPress 5.5, core also adds a sitemap line when the site is public (WP_Sitemaps::add_robots).
User-agent: * Disallow: /wp-admin/ Allow: /wp-admin/admin-ajax.php Sitemap: https://yourdomain.com/wp-sitemap.xml
Keep the admin-ajax.php line. Some themes and plugins load front-end content through it, and blocking it can stop crawlers from rendering pages correctly.
Worked example: block training, keep AI search
User-agent: * Disallow: /wp-admin/ Allow: /wp-admin/admin-ajax.php User-agent: GPTBot User-agent: ClaudeBot User-agent: Google-Extended User-agent: CCBot Disallow: / Sitemap: https://yourdomain.com/wp-sitemap.xml
OAI-SearchBot, Claude-SearchBot and PerplexityBot have no group of their own, so they follow the * group and can still read your public pages.
For a complete WordPress file with every rule explained, including what not to block, read our guide to robots.txt for WordPress.
Common mistakes
- Blocking
/wp-content/or/wp-includes/. This hides CSS, JavaScript and images that Google needs to render pages. - Using robots.txt to hide a page from Google. Google can still index a blocked URL without a snippet. Use a noindex tag instead.
- Two robots.txt sources. A physical file in the web root replaces the WordPress virtual file, and SEO plugins may also edit it. Check what
yourdomain.com/robots.txtactually shows. - Leaving
Disallow: /from staging after a site goes live. - Paths without a leading slash. Rules must start with
/. The generator adds the slash and shows a warning. The tester ignores any rule that does not start with/or*. - Relying on Crawl-delay. Google and Amazon do not support it.
For a full plan on getting cited by AI tools, read how to rank in ChatGPT or see our SEO and AI search optimization service. WordPress owners can also manage these settings with WP Toolkit Studio.
Last updated: October 25, 2026