Building the file from choices instead of typing it
Most robots.txt problems are typing problems: a forgotten slash, a Disallow copied from staging, a sitemap URL that still points at the dev domain. This generator removes that class of bug. You pick a preset or add groups, choose a crawler for each group, list the paths to allow or block, and the tool writes clean syntax in your browser as you go. Nothing is sent to a server, and you can copy the result or download it as a robots.txt file.
Five presets cover the common starting points: allow everything, block admin areas, a WordPress set (blocks /wp-admin/ but keeps admin-ajax.php open, plus internal search), block AI training bots, and block everything for a staging site. The crawler picker lists the user agents worth knowing, from Googlebot and Bingbot to GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot, CCBot and Bytespider.
The tool also warns as you build. It tells you when a path was missing its leading slash and was fixed, when the same crawler appears in two groups, when Crawl-delay is set (Google ignores it), when the sitemap is not a full URL, and, loudly, when User-agent: * is paired with Disallow: /.
The smallest file that does the job
For most marketing sites the right robots.txt is tiny: User-agent: * on one line, an empty Disallow: on the next (empty means nothing is blocked), and a Sitemap line with the full URL of your sitemap. That says every crawler is welcome everywhere and here is the list of URLs. Add rules only when you have a real reason to keep crawlers out of specific paths.
Comments start with a hash sign and run to the end of the line. Blank lines separate groups. Field names such as User-agent and Disallow are not case sensitive, but path values are, so /Admin and /admin are different paths. The generator always emits at least one rule per group, because a User-agent line with no rules beneath it is not a valid group.
A WordPress file with two AI opt-outs
Here is what the WordPress preset looks like after adding two AI training opt-outs. Search engines can crawl everything except the dashboard and internal search; OpenAI's training crawler and Google's Gemini training token are both disallowed.
User-agent: *
Allow: /wp-admin/admin-ajax.php
Disallow: /wp-admin/
Disallow: /?s=
Disallow: /search/
User-agent: GPTBot
Disallow: /
User-agent: Google-Extended
Disallow: /
Sitemap: https://www.example.com/sitemap.xmlTwo details matter. First, GPTBot and Google-Extended each have their own group, so they follow only those groups and ignore the wildcard rules above them. Second, Google-Extended is a robots.txt token, not a separate crawler: blocking it opts your content out of Gemini training and grounding, but it has no effect on Google Search rankings, indexing or AI Overviews.
Rules that come up on almost every site
Block admin and account areas such as /wp-admin/, /account/ and /checkout/, which have no value in search. Remember the file is public, so never list paths whose existence you want to keep secret; use a login for those.
Keep CSS and JavaScript crawlable. If a legacy rule blocks /assets/, add Allow: /assets/*.css and Allow: /assets/*.js so Google can render pages properly. Block parameter URLs that create endless duplicates, such as Disallow: /*?sort= and Disallow: /*?sessionid=, which keeps crawlers out of filter and sort combinations. Our crawl budget guide explains when that is worth doing and when it is premature.
Deciding on AI crawlers deliberately
AI user agents fall into two groups. Training crawlers gather text for future models: GPTBot (OpenAI), ClaudeBot (Anthropic), CCBot (Common Crawl), Bytespider (ByteDance), Meta-ExternalAgent and the Google-Extended and Applebot-Extended tokens. Answer crawlers fetch pages to cite in live results: OAI-SearchBot for ChatGPT search, Claude-SearchBot, and PerplexityBot. ChatGPT-User fetches a page only when a person asks ChatGPT to open it.
The "Block AI training bots" preset disallows the training group while leaving search engines and answer crawlers allowed, which is the most common middle ground: stay citable in AI answers without donating content to model training. If you want a file built around AI choices alone, the AI Bot Robots.txt Generator goes deeper on that list.
Crawl-delay, and why it is usually left blank
Crawl-delay asks a crawler to wait a number of seconds between requests. Bing and Yandex respect it; Googlebot ignores it and adjusts its own rate based on how your server responds. Writing Crawl-delay: 10 does nothing for Google but slows Bing to one request every ten seconds, which can delay indexing of new pages there. Use it only for a specific bot that is genuinely straining your server.
How groups and precedence actually work
A crawler picks the single most specific group that names it and obeys only that group. It does not merge the wildcard group with its own named group. So if your User-agent: * group blocks /cart/ and you add a User-agent: GPTBot group that only allows /blog/, GPTBot ignores the /cart/ rule completely. If a named crawler should also follow your shared rules, repeat them inside its group. If the same crawler appears in two groups, Google merges them, and the generator warns you so you can tidy them into one.
Inside a group, order does not decide the outcome for Google or Bing. The longest matching path wins, and when an Allow and a Disallow are equally long, Allow wins. The asterisk matches any characters and the dollar sign anchors the end of the URL, so Disallow: /*.pdf$ blocks URLs ending in .pdf but not /guide.pdf-notes. Only those two special characters are supported; other regex syntax is treated as literal text.
Uploading the file on your platform
WordPress
Paste the output into Yoast SEO (Tools, File editor) or Rank Math (General Settings, Edit robots.txt), or upload robots.txt to the site root over FTP, which replaces WordPress's virtual file.
Shopify
Create a robots.txt.liquid template in the theme code editor. Keep Shopify's default rules for checkout and cart, and add your own groups below them.
Nginx, Apache or a static host
Put the file in the public web root so it is served at /robots.txt with a 200 status and a text/plain content type. Google follows up to five redirects to reach it, but serving it directly is safer. Each subdomain needs its own copy.
Testing before and after you publish
Before you replace the live file, check the new rules against a list of your most important URLs and confirm none of them would be blocked. After deploying, run the live Robots.txt Tester to see how 25+ search and AI crawlers now treat your site. Google can take up to a day to pick up the new version; the robots.txt report in Search Console shows which version it fetched last.
Keep the file in version control with a note on why each rule exists. A robots.txt nobody understands is a robots.txt nobody dares change, and stale rules quietly block sections that later become important.