Robots.txt generator and tester
Build a correct robots.txt in a minute, with presets for WordPress, online stores, SaaS apps, and staging, and a clear choice for AI crawlers. Then test any path against Googlebot, GPTBot, or any other bot.
Search crawlers for ChatGPT, Perplexity, and Claude can fetch you; model-training crawlers are blocked.
One per line. * matches anything, $ marks the end of a URL.
robots.txt
User-agent: * Allow: / # Opt out of AI model training User-agent: GPTBot User-agent: ClaudeBot User-agent: Google-Extended User-agent: Applebot-Extended User-agent: CCBot User-agent: Meta-ExternalAgent User-agent: Bytespider User-agent: Amazonbot Disallow: /
Upload it to the root of your domain so it loads at /robots.txt.
Test a URL path
Allowed: other bots on /
The two-minute robots.txt checklist
- Never ship a staging file with
Disallow: /to production. - Do not block CSS or JavaScript; Google needs them to render your pages.
- List your sitemap with a full URL.
- Decide on AI crawlers on purpose instead of by accident.
Read the full guide: robots.txt for AI crawlers.
Questions
Should I block GPTBot and other AI crawlers?
Block training crawlers (GPTBot, ClaudeBot, Google-Extended, CCBot) if you do not want your content used to train models. Do not block search crawlers (OAI-SearchBot, PerplexityBot, Claude-SearchBot) unless you are fine with ChatGPT search, Perplexity, and Claude rarely showing or citing your pages.
Does robots.txt hide a page from Google?
No. It stops crawling, not indexing. A blocked page can still appear in results if other sites link to it. Use a noindex meta tag (and let Google crawl it) or password protection to keep a page out.
Why does a named User-agent group ignore my * rules?
Under RFC 9309 a crawler uses only the most specific group that names it. If you add a GPTBot group, GPTBot ignores everything under User-agent: *. This generator only adds named groups that block, so your * rules keep applying to everyone else.
Where do I put robots.txt?
At the root of each host: https://example.com/robots.txt. A subdomain such as blog.example.com needs its own file.
If robots.txt allows a bot, can Cloudflare still block it?
Yes. robots.txt is advice to well-behaved crawlers; WAF or Bot Fight rules can still challenge or block them. Allow the AI search user-agents you care about at the CDN too.
Related tools
AI crawler checker
See which of 16 AI crawlers your robots.txt allows or blocks, with a copy-paste fix.
Open tool →llms.txt generator
Build an llms.txt file from your sitemap so AI tools that read llms.txt get a clean map of your site.
Open tool →Free website checker
Paste a public URL for one launch report from server HTML (SEO, headers, AI). Speed and WCAG are Pro in the Chrome extension; free install still helps on localhost and JS-heavy apps.
Open tool →Related guides
Robots.txt for AI crawlers: get cited by ChatGPT, Perplexity, and Claude
The difference between AI search and AI training bots, the exact robots.txt rules to use, and the mistakes that make sites invisible to AI answers.
Read · 8 min →How to get your website cited by ChatGPT, Perplexity, and Google AI Overviews
A practical playbook for AI search visibility (GEO): let the right crawlers in, serve content in HTML, write answer-first pages, add structured data, and earn mentions AI engines trust.
Read · 10 min →Why AI crawlers see an empty page (and how to fix it)
Why ChatGPT, Perplexity, and other AI bots miss SPA and client-rendered sites, how to confirm it, and how SSR, SSG, or pre-rendering fixes it.
Read · 8 min →