robots.txt is a short text file that tells crawlers which parts of your site they may visit. It is one of the first files a search engine requests, and a single wrong line can hide a whole site from search. This generator helps you write the rules and, just as important, test them before they go live.
A typical file
The WordPress preset produces something like this:
User-agent: *
Allow: /wp-admin/admin-ajax.php
Disallow: /wp-admin/
Disallow: /?s=
Sitemap: https://www.example.com/sitemap.xml
It keeps the admin area and internal search results out of crawlers’ way, while still allowing the AJAX file that many themes need. Type /wp-admin/admin-ajax.php into the tester and you’ll see the longer Allow rule wins over the shorter Disallow.
What to block, and what not to
Block pages with no search value that waste crawl time: internal search results, endless filter and sort combinations, carts and checkouts. Don’t block CSS and JavaScript files, because Google needs them to see your pages properly. And never use robots.txt to hide private information. The file is public, and it lists exactly where those pages are.
AI crawlers
Many AI companies publish the name of the bot they use to collect training data. The AI option adds a group that disallows all of them. Well-behaved bots respect it; robots.txt is a request, not a lock, so truly private content needs a login.
How to use the Robots.txt Generator
- Pick a starting point: Allow everything, WordPress, Online shop or Block everything.
- Edit the user-agents and the Disallow and Allow paths in each rule group, or add a group for another crawler.
- Tick Block all known AI crawlers if you don’t want your content used to train AI models.
- Add your sitemap URL.
- Test a path and crawler in Test a URL, then copy or download the file.
Features
- Multiple rule groups, each with its own user-agents, Allow and Disallow paths and Crawl-delay.
- One-click blocking of 12 AI crawlers, including GPTBot, ClaudeBot, Google-Extended, CCBot and PerplexityBot.
- URL tester that follows Google’s rules: the longest matching rule wins, and * and $ wildcards are supported.
- Warnings for paths without a leading slash and site-wide blocks.
- Download as a ready-to-upload robots.txt file.
Frequently asked questions
Where does robots.txt go?
In the root of your domain, so it loads at https://yourdomain.com/robots.txt. Each subdomain needs its own file. Crawlers don’t look for it anywhere else.
Does Disallow remove a page from Google?
No. It stops crawling, but a blocked page can still be indexed from links elsewhere, shown without a description. To remove a page from results, allow crawling and add a noindex meta tag instead.
Will blocking AI crawlers hurt my search rankings?
No. Tokens like Google-Extended and Applebot-Extended only control AI training use. Googlebot and Bingbot, which handle search, are separate and stay allowed.
What do * and $ mean in robots.txt?
* matches any characters and $ marks the end of the URL. Disallow: /*.pdf$ blocks every URL ending in .pdf, and Disallow: /*?sort= blocks any URL with a sort parameter.
Written by Dewan Razib