What should a robots.txt file contain?
At minimum, a User-agent line and the rules for it, plus a Sitemap line. Most sites allow everything and block only private or low-value areas such as admin panels, carts and internal search results. Separate User-agent groups can set different rules for specific crawlers, including AI bots.
How to use the Robots.txt Generator
- Choose whether crawlers are allowed or blocked by default.
- List folders to block and any exceptions to allow.
- Tick any AI crawlers you want to block and add your sitemap URL.
- Copy the file, save it as robots.txt at your site root, and test it with the Robots.txt Tester.
Why it matters for SEO
- A correct file keeps crawlers out of private and duplicate areas.
- A single typo can block an entire site, so generating it avoids mistakes.
- AI crawler rules give you control over how AI systems use your content.
- Listing your sitemap helps search engines find every page.
Key facts
- robots.txt must be at the root of the host: example.com/robots.txt.
- Paths are case-sensitive.
- An empty Disallow: line means allow everything.
- Includes rules for 9 AI crawlers.
Robots.txt Generator FAQ
Can robots.txt hide private content?
No. It's publicly readable and only a request to well-behaved crawlers. Protect private content with a login, and use noindex for pages that shouldn't appear in search.
Should I block /wp-admin/?
Blocking /wp-admin/ is common on WordPress, but allow /wp-admin/admin-ajax.php because some themes and plugins need it.
Will blocking AI crawlers affect Google rankings?
Blocking GPTBot, ClaudeBot or Google-Extended doesn't affect Google Search rankings. Blocking Googlebot does.
How do I test my robots.txt?
Use our Robots.txt Tester to check specific URLs against each crawler, and Google Search Console's robots.txt report.