Robots.txt generator
Make a correct robots.txt file for your website in a minute. Choose which folders search engines should skip, add exceptions, link your sitemap, and decide whether AI crawlers such as GPTBot, ClaudeBot and Google-Extended may use your content. Then test any page path to see whether Googlebot or another bot is allowed to crawl it, using the same matching rules Google uses.
Test a page against these rules
How to use the robots.txt generator
- Leave all search engines on Allowed unless the site isn't ready to be found.
- Add your sitemap URL.
- List any folders or pages to block, one per line, and any exceptions to allow.
- Tick the AI crawlers you want to block.
- Copy or download the file, and upload it to the top folder of your site so it opens at yoursite.com/robots.txt.
- Use Test a page to check important pages are still allowed.
How it works
Search engines read robots.txt before crawling your site. It's made of groups, each starting with User-agent (which bot it's for), followed by Allow and Disallow rules.
Disallow: /admin/blocks everything inside /admin/.Disallow: /.pdf$blocks addresses ending in .pdf.means "anything" and$means "ends here".Disallow:with nothing after it allows everything.
Which rule wins: Google uses the longest matching rule. If an Allow and a Disallow rule are the same length, Allow wins. A bot follows only the most specific group that names it, and falls back to User-agent: * if none does. The tester here follows these rules.
AI crawlers: blocking Google-Extended stops your content being used for Google's AI models, but doesn't affect Google Search. Blocking GPTBot, ClaudeBot and others asks those companies' crawlers not to collect your pages.
Important: robots.txt is a request, not a lock. Well-behaved bots follow it, but it doesn't hide pages: a blocked page can still appear in search results if other sites link to it. To keep a page out of Google, use a noindex tag instead, and protect private areas with a password.
Example
Allow everything except an admin area, keep one help page inside it open, add a sitemap and block OpenAI's crawler:
User-agent: GPTBot
Disallow: /
User-agent: *
Allow: /admin/help/
Disallow: /admin/
Sitemap: https://www.example.com/sitemap.xml
Testing /admin/settings for Googlebot gives Blocked, while /admin/help/faq is Allowed, because the Allow rule is longer.
Frequently asked questions
Where do I put robots.txt?
In the top (root) folder of your website, so that it opens at https://www.yoursite.com/robots.txt. A robots.txt in a sub-folder is ignored.
Will blocking a page in robots.txt remove it from Google?
Not always. It stops Google crawling the page, but the address can still appear in results if other sites link to it. Use a noindex meta tag, and let Google crawl the page so it can see that tag.
Does blocking AI bots hurt my Google ranking?
No. Blocking Google-Extended or other AI crawlers does not affect how Googlebot crawls and ranks your pages in Google Search.
Does Google follow Crawl-delay?
No. Google ignores Crawl-delay. Bing and Yandex follow it.
Last updated: 29 October 2026