Robots.txt Generator
Build a correct robots.txt in a minute, block the bots you don't want, and test URLs against your rules.
Rules for specific bots
Test a URL
- Free & unlimited
- No sign-up
- Instant results
How to use Robots.txt Generator
- Choose whether search engines may crawl the whole site, and list folders to block.
- Pick rules for individual bots, e.g. block AI crawlers, and add your sitemap URL.
- Download robots.txt, upload it to your site's root, and test URLs here.
What robots.txt does
robots.txt is a small text file at the root of your site (https://example.com/robots.txt) that tells crawlers which pages they may visit. Search engines like Google and Bing follow it. It is a request, not a lock: badly behaved bots can ignore it, and it doesn't hide private data.
Blocking AI crawlers
Choose Block AI crawlers to add rules for GPTBot, ChatGPT-User, Google-Extended, ClaudeBot, CCBot, PerplexityBot and Bytespider. This asks AI companies not to use your pages for training or answers, while normal Google and Bing search keep working.
How rules are matched
Google uses the group for the most specific bot name. Inside it, the longest matching rule wins, and Allow wins a tie. * matches anything and $ marks the end of the URL, so /*.pdf$ blocks all PDF files. The tester on this page follows the same rules.
Frequently asked questions
Will blocking a page remove it from Google?
No. A blocked page can still appear in results if other sites link to it. To remove a page, let Google crawl it and add a noindex meta tag.
Where do I put the file?
In the top folder of your domain, so it opens at yoursite.com/robots.txt. Subdomains need their own file.
Does Google follow Crawl-delay?
No; Google ignores it. Bing and Yandex use it.
Should I block /wp-admin/?
Most WordPress sites block /wp-admin/ but allow /wp-admin/admin-ajax.php, which the preset does.
Related tools
XML Sitemap Generator
Turn a list of URLs into a sitemap.xml file.
Meta Tag Generator
Create title, description and SEO meta tags with a Google preview.
URL Encode & Decode
Percent-encode or decode URLs and split them into parts.
SERP Snippet Preview
See how your page looks in Google search results.
More SEO & Website Tools
Open Graph Generator
Make Facebook, WhatsApp, X and LinkedIn share previews.
Keyword Density Checker
Count keywords and phrases and check keyword density.
UTM Link Builder
Add UTM tracking tags to links for Google Analytics.
WhatsApp Link Generator
Create wa.me click-to-chat links with a message and QR code.