Free Robots.txt Generator Including AI Crawlers
Billion Game
Book a strategy call
Free tool · runs in your browser

Robots.txt generator

Pick which crawlers you want, add the paths nobody should be fetching, declare your sitemap, and copy a valid file. Includes the AI crawlers most generators still ignore.

Robots.txt generator Nothing is uploaded
Search crawlers
AI crawlers
Seconds. Google ignores this, Bing respects it. Leave empty to omit.
/robots.txt
# robots.txt
# Generated with thebilliongame.com/tools/robots-txt-generator

User-agent: *
Disallow:

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: Google-Extended
Disallow: /

# Explicitly welcome, so a wildcard block never catches them by accident
User-agent: OAI-SearchBot
Allow: /
User-agent: PerplexityBot
Allow: /
i No sitemap declared. It is not required, but it is the cheapest way to tell every crawler where your URLs are.
Reference

Which robots.txt directives do Google and Bing support?

Google and Bing both support User-agent, Disallow, Allow and Sitemap; Bing also honours Crawl-delay, which Google ignores, and neither supports Noindex, Host or Clean-param. This is the complete set, what each one does, and the mistake we see most often with it.

Directive What it does Google Bing The usual mistake
User-agent Opens a group of rules that applies to one named crawler, or to all with an asterisk. Yes Yes Writing several groups for the same bot. Only the first matching group is read.
Disallow Tells the crawler not to fetch URLs beginning with this path. Yes Yes Using it to keep a page out of the index. It prevents the fetch, not the listing.
Allow Carves an exception out of a broader Disallow rule. Yes Yes Assuming order decides it. The longest matching rule wins, not the first one.
Sitemap Declares a sitemap URL to every crawler that reads the file. Yes Yes Using a relative path. It must be a full absolute URL including the protocol.
Crawl-delay Asks the crawler to wait n seconds between requests. No Yes Relying on it to calm Googlebot. Google ignores it entirely.
Noindex Was an unofficial Google directive. Support was removed in 2019. No No Still copied from old blog posts. It does nothing and gives false comfort.
Host A Yandex directive naming the preferred domain mirror. No No Adding it for canonicalisation. Use redirects and canonical tags instead.
Clean-param A Yandex directive for ignoring tracking parameters. No No Expecting it to solve faceted duplication for Google. It will not.
Worked examples

What are good robots.txt examples to copy?

Billion Game's six copyable robots.txt files cover an ecommerce store, a WordPress site, staging, AI search allowed with AI training blocked, a news publisher, and one aggressive bot blocked. Each is a real shape we have shipped, so swap the domain and check the paths against your own URL structure before deploying.

Ecommerce store

Blocks the three patterns that eat crawl budget on almost every catalogue: filters, internal search, and checkout.

User-agent: *
Disallow: /cart
Disallow: /checkout
Disallow: /account/
Disallow: /search
Disallow: /*?sort=
Disallow: /*?filter=
Disallow: /*?utm_

Sitemap: https://example.com/sitemap.xml

WordPress site

Leaves wp-admin blocked but keeps admin-ajax reachable, because themes and plugins render front-end content through it.

User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php
Disallow: /?s=
Disallow: /search/
Disallow: /*?replytocom=

Sitemap: https://example.com/wp-sitemap.xml

Staging or development

The only case where blocking everything is correct. Add HTTP authentication as well, because robots.txt is a request, not a lock.

User-agent: *
Disallow: /

# Also protect this host with HTTP auth.
# A disallowed URL can still be indexed
# if something links to it.

Allow AI search, block AI training

The configuration most businesses actually want: quotable in live assistant answers, excluded from model training.

User-agent: OAI-SearchBot
Allow: /

User-agent: PerplexityBot
Allow: /

User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: Google-Extended
Disallow: /

News or publisher

Keeps archives and tag pages out of the crawl path while leaving articles and the news sitemap fully open.

User-agent: *
Disallow: /tag/
Disallow: /author/
Disallow: /page/
Disallow: /*?print=
Allow: /

Sitemap: https://example.com/sitemap-news.xml
Sitemap: https://example.com/sitemap.xml

Aggressive bot, everything else open

Targets one misbehaving crawler by name without touching anything that matters for search.

User-agent: *
Disallow:

User-agent: SemrushBot
Crawl-delay: 10

User-agent: AhrefsBot
Crawl-delay: 10

User-agent: MJ12bot
Disallow: /

Sitemap: https://example.com/sitemap.xml
Under the hood

How does a crawler read a robots.txt file?

A crawler picks exactly one user-agent group in robots.txt and applies the most specific matching rule inside it, rather than reading the file top to bottom like a script. That wrong assumption, not typos, causes most robots.txt bugs.

01 Only one group applies A crawler finds the single most specific group matching its name and reads only that. If Googlebot has its own group, every rule under User-agent: * is ignored for Googlebot, including the ones you assumed were global.
02 Longest match wins, not first Given Disallow: /blog and Allow: /blog/seo, the second wins for /blog/seo because it is the longer matching pattern. Order in the file is irrelevant, which surprises almost everyone.
03 A tie goes to Allow When a Disallow and an Allow rule match a URL with exactly the same length, Google resolves it in favour of Allow. Bing behaves the same way in practice.
04 Paths are case sensitive Disallow: /Search does not block /search. On a case-insensitive server that is a silent failure you will not notice until you check the logs.
05 A 404 means open season If robots.txt returns 404, crawlers treat the whole site as allowed. If it returns a 5xx error, Google treats the whole site as disallowed for up to thirty days, which is a genuinely dangerous outage mode.
06 Google reads the first 500 kibibytes Anything past that limit is ignored. Enormous auto-generated robots.txt files, common on large ecommerce platforms, silently drop their later rules.
From real audits

What are the most common robots.txt mistakes?

The most common robots.txt mistakes are disallowing a page you wanted noindexed, shipping the staging file to production, blocking CSS and JavaScript, blocking URLs that carry backlinks, using the file as a security control and blocking every AI crawler by reflex. Every one takes minutes to fix once someone has actually looked at the file.

Disallowing a page you wanted noindexed The crawler can never fetch the page, so it never sees the noindex tag. The URL sits in the index with no description, sometimes for years. Allow the crawl and use meta robots instead.
Shipping the staging file to production Disallow: / goes live with the launch and the whole site drops out of search within a fortnight. Make robots.txt an environment variable, not a file someone remembers to edit.
Blocking CSS and JavaScript Google renders pages before judging them. Block /assets/ or /static/ and it sees an unstyled skeleton, which affects both mobile usability and what it believes the page contains.
Blocking a URL that carries backlinks A disallowed URL cannot pass equity onward, so links pointing at it are wasted. Check the backlink profile before disallowing anything that used to be a real page.
Using robots.txt as a security control The file is public and lists exactly which paths you consider sensitive. Anyone scraping it gets a map of your admin routes. Use authentication for anything that genuinely matters.
Blocking every AI crawler by reflex Training crawlers and search-time crawlers are different things with the same vibe. Block GPTBot and you opt out of training; block OAI-SearchBot and you also disappear from ChatGPT's live answers.
How to use it

Does robots.txt keep a page out of Google?

Robots.txt does not keep a page out of Google: a disallowed page cannot be fetched, so Google never sees its noindex tag, and the URL can sit in the index indefinitely with no description under it. Disallowing pages to keep them out of Google is the most common mistake we find.

Use robots.txt for what it is good at — keeping crawlers away from URL patterns that waste crawl budget, like faceted parameters, internal search and checkout. Use meta robots for anything you want out of the index.

The AI crawler rules deserve a decision rather than a default. Blocking training crawlers is a content-rights choice. Blocking search-time crawlers like OAI-SearchBot removes you from live AI answers, which is a visibility choice, and they are not the same question.

See our technical SEO services

No. Robots.txt controls crawling, not indexing. A disallowed URL can still appear in results if other sites link to it, because Google can index a URL it has never fetched. To keep a page out of the index, allow the crawl and use a noindex meta robots tag, or protect it behind authentication.

Nothing bad. A missing robots.txt returns 404 and crawlers treat the entire site as allowed, which is the correct default for most small sites. The file only becomes necessary when you have URL patterns worth keeping crawlers away from, or a sitemap worth declaring.

Indirectly, yes. Blocking low-value URL patterns returns crawl budget to pages that can rank, which on large sites measurably speeds up how quickly new pages are discovered. On a site under a few thousand URLs the effect is usually negligible.

Yes. Robots.txt applies to exactly one host, so shop.example.com, blog.example.com and example.com each need their own file at their own root. The same applies across protocols, though in practice everything should redirect to HTTPS anyway.

Paste it into our robots.txt tester with a specific URL and it will tell you whether that URL is blocked and by which rule. Google Search Console also has a robots.txt report showing the file as Google last fetched it, which is worth checking after any change.

Allow search-time crawlers such as OAI-SearchBot and PerplexityBot if you want AI recommendations, and decide separately about training crawlers. Blocking GPTBot and ClaudeBot removes your content from model training, but blocking OAI-SearchBot and PerplexityBot also removes you from the answers those assistants give live, which is a visibility decision rather than a copyright one.

At the root of the host, exactly at /robots.txt, served over the same protocol and subdomain as the pages it governs. A file at /folder/robots.txt is ignored, and a robots.txt on www does not apply to a bare domain or to a separate subdomain such as shop or blog.

Disallow in robots.txt tells a crawler not to fetch the URL. Noindex in a meta tag or HTTP header tells it not to keep the page in the index. They conflict when used together: a disallowed page can never be fetched, so its noindex tag is never seen, and the page can linger in the index indefinitely.

No. Google ignores the crawl-delay directive entirely and manages fetch rate through its own algorithms and Search Console settings. Bing and several other crawlers do respect it, so it is still worth including if a specific bot is overloading your server.

Only if server load is a genuine problem. Blocking them hides your backlink profile from those tools, which also means your competitors cannot study it, but it means you lose visibility into your own data too. A crawl delay is usually the better compromise.

Yes, and this catches people out. AdsBot-Google does not follow the wildcard User-agent: * group, so a site-wide disallow will not block it, but an explicit AdsBot rule will and can disapprove your landing pages. Merchant Center similarly needs to fetch product URLs to validate them.

No, but Google and Bing support two wildcard characters: an asterisk matching any sequence, and a dollar sign anchoring the end of a URL. So Disallow: /*.pdf$ blocks PDFs. Most other crawlers support neither, so treat wildcards as a Google and Bing feature only.

Google caches robots.txt for around twenty-four hours, so most changes take effect within a day. Removing a disallow does not immediately index the pages, though: they still have to be crawled and assessed, which typically takes days to weeks depending on the site.

It must be served at the root path exactly, so https://example.com/robots.txt. Crawlers do not look anywhere else. A file inside a folder, or one served under a different filename, is simply never requested.

Not reliably, and not quickly. If the page is already indexed, blocking the crawl freezes it there, because Google cannot fetch it to discover it has changed. To remove a page, allow the crawl and serve a noindex tag or a 410 status, then use the Search Console removal tool for anything urgent.

Our stack

Billion Game runs your work through the same instruments the best in-house teams use.

Licences are on us, and every export we pull from them is yours to keep.

Semrush logo
Ahrefs logo
Screaming Frog logo
Google Search Console logo
Google Analytics logo
PageSpeed Insights logo
Claude logo
Rank Math logo
WP Rocket logo
✎

Be wary of any agency whose reporting is a tool dashboard with their logo on it. Tools measure; they do not decide what matters, and every one of these will happily generate a hundred findings that change nothing. What you are paying for is the judgement about which three of those hundred are worth your developers’ time.

Free tool Robots.txt tester Check whether a specific URL is blocked by your rules. Free tool Schema generator Valid JSON-LD for the types that change your result. Free tool AI extractability checker See whether an assistant can lift an answer from your page. Index All free tools Everything we have built, free and without signup.