CoreCited
Generator + tester · 15 crawlers · runs in your browser

Robots.txt generator and tester

Create a robots.txt file in a few clicks, decide crawler by crawler which search engines and AI bots may read your site, then use the built-in robots.txt checker to test any URL and see exactly which line allows or blocks it.

1 · Start from
2 · Platform
3 · Crawlers
Search engines
GooglebotGoogleSearch engine
BingbotMicrosoftSearch engine
AI crawlers
GPTBotOpenAIAI training
OAI-SearchBotOpenAIAI search
ChatGPT-UserOpenAIAI user fetch
ClaudeBotAnthropicAI training
Claude-SearchBotAnthropicAI search
Claude-UserAnthropicAI user fetch
PerplexityBotPerplexityAI search
Perplexity-UserPerplexityAI user fetch
Google-ExtendedGoogleAI training
Applebot-ExtendedAppleAI training
Meta-ExternalAgentMetaAI training
BytespiderByteDanceAI training
CCBotCommon CrawlAI training
Your robots.txt
# robots.txt generated by CoreCited — https://corecited.com/tools/robots-txt-generator

# Everyone else
User-agent: *
Disallow:
Upload it as /robots.txt at the root of your domain. Built in your browser; nothing is sent to us.
[01] WHAT ROBOTS.TXT IS

A text file that tells crawlers where not to go.

A robots.txt file is a plain text file at the root of a website, such as example.com/robots.txt, that tells web crawlers which URLs they may request. It is defined by the Robots Exclusion Protocol, standardised as RFC 9309 in 2022, and every major search engine and AI company reads it before crawling.

It controls crawling, not indexing, and it is a request, not a lock. Well-behaved crawlers follow it. It does not hide a page from anyone who types the URL, and it does not guarantee a page stays out of search results. For that you need a noindex tag on a page that crawlers are allowed to read.

Lives at
/robots.txt
Only at the root. A file in a subfolder is ignored.
Applies to
One host
blog.example.com needs its own file.
Google reads
500 KiB
Anything past that is ignored.
Default
Allow
No file, or no matching rule, means allowed.
[02] THE FORMAT

Every directive a robots.txt can hold, and what it does.

A file is a list of groups. Each group starts with one or more User-agent lines and holds the Allow and Disallow rules for those crawlers. Directive names are case-insensitive; the paths in them are not.

DirectiveExampleWhat it does
User-agentUser-agent: GooglebotStarts a group and names who it is for. * means every crawler not named elsewhere. Several User-agent lines in a row share one group.
DisallowDisallow: /private/A path the crawler should not fetch. An empty value (Disallow:) blocks nothing.
AllowAllow: /private/public/Re-opens a path inside a disallowed one. The longer, more specific rule wins.
SitemapSitemap: https://example.com/sitemap.xmlWhere your XML sitemap is. Must be a full URL. It can go anywhere in the file and belongs to no group.
Crawl-delayCrawl-delay: 5Seconds to wait between requests. Bing honours it; Google ignores it.
*Disallow: /*.pdfMatches any run of characters inside a path.
$Disallow: /*.pdf$Anchors the rule to the end of the URL, so /file.pdf?x=1 no longer matches.
## a commentEverything after # on a line is ignored.
[03] HOW A CRAWLER DECIDES

The order of lines does not matter. Specificity does.

The most common robots.txt bug is assuming rules are read top to bottom, like a firewall. They are not. A crawler finds the one group meant for it, then picks the single most specific rule that matches the URL. These are the rules the tester above applies:

How a crawler reads your robots.txt
Click a step, or let it play.
Find its group
It looks for groups whose User-agent matches its own name, ignoring case. Googlebot looks for 'googlebot'.
Step 1: Find its group. It looks for groups whose User-agent matches its own name, ignoring case. Googlebot looks for 'googlebot'.
Step 2: Merge or fall back. Every group naming it is combined into one. If none does, it uses the * groups instead. If there are none, everything is allowed.
Step 3: Ignore the rest. Once a crawler has its own group, the * group no longer applies to it at all, even rules you meant for everyone.
Step 4: Match the URL. It collects every Allow and Disallow rule whose path matches the start of the URL, with * and $ expanded.
Step 5: Longest wins. The rule with the longest path wins. If an Allow and a Disallow are exactly as long, Allow wins.
The trap most files fall into
You write Disallow: /admin/ under User-agent: *, then add a separate group for GPTBot to allow it. GPTBot now ignores the * group entirely, including the admin rule. The generator above avoids this by repeating shared rules inside every named group that is not a full block.
[04] ROBOTS.TXT EXAMPLES

Eight robots.txt examples you can copy.

Each sample below is a complete file. Swap example.com for your domain, or paste it into the tester to see what it does to a URL before you upload it.

The right default for most public sites: every crawler may read everything.
User-agent: *
Disallow:

Sitemap: https://example.com/sitemap.xml
[05] ROBOTS.TXT FOR AI CRAWLERS

Block AI training without disappearing from AI answers.

AI companies run separate crawlers for separate jobs. 7 of the crawlers below collect training data; blocking them costs no visibility today. 3 build the search indexes that ChatGPT, Claude and Perplexity cite from; blocking those removes you from their answers. Most sites that “block AI” only meant the first kind.

User-agentOperatorJobWhat blocking it costs you
GPTBotOpenAIModel trainingYour content is not used to train future OpenAI models. It does NOT remove you from ChatGPT's answers — that is OAI-SearchBot.
OAI-SearchBotOpenAIAI search indexYou are removed from ChatGPT's search index. This is the one that decides whether ChatGPT can cite you.
ChatGPT-UserOpenAIFetches on a user's requestAsks ChatGPT not to open your page when a user's question needs it. OpenAI says robots.txt rules "may not apply" to these user-initiated fetches, so this line may not stop it; blocking at your server or CDN will.
ClaudeBotAnthropicModel trainingYour content is not used to train Claude.
Claude-SearchBotAnthropicAI search indexYou are removed from the index Claude searches when answering.
Claude-UserAnthropicFetches on a user's requestClaude cannot fetch your page on a user's behalf.
PerplexityBotPerplexityAI search indexYou are removed from Perplexity's index. Perplexity cites sources heavily, so this is usually the most costly single block.
Perplexity-UserPerplexityFetches on a user's requestAsks Perplexity not to open your page for a user's question. Perplexity says this fetcher generally ignores robots.txt rules, so block it at your server or CDN if you mean it.
Google-ExtendedGoogleModel trainingYour content is not used for Gemini training or grounding. It does NOT remove you from Google Search or AI Overviews — see the note below.
Applebot-ExtendedAppleModel trainingYour content is not used to train Apple Intelligence.
Meta-ExternalAgentMetaModel trainingYour content is not used to train Meta's models.
BytespiderByteDanceModel trainingYour content is not used to train ByteDance's models.
CCBotCommon CrawlModel trainingYou leave the Common Crawl dataset, which many model builders train on — so this one block affects more than one company.
Google is the exception
Google AI Overviews are served by Googlebot, not Google-Extended. There is no way to leave AI Overviews and stay in Google Search — the same crawler does both. Google-Extended only controls Gemini training and grounding.
Want to see what your live site allows today? The AI Crawler Checker fetches your robots.txt and reports every AI crawler it lets in. For the reasoning behind blocking OpenAI's training bot, read Should you block GPTBot?
[06] COMMON MISTAKES

Six robots.txt mistakes that quietly cost traffic.

Shipping the staging file

A Disallow: / written for a staging site and deployed to production is the most expensive single line in SEO. Check the live file after every launch.

Using it to hide a page from Google

A disallowed URL can still be indexed from links, with no snippet. To keep a page out of results, let it be crawled and add noindex.

Blocking CSS and JavaScript

Google renders pages like a browser. Blocking the files your layout needs can make it misread the page. Leave assets crawlable.

Assuming top-to-bottom order

Order is irrelevant. The longest matching rule wins, and a crawler with its own group ignores the * group entirely.

Listing secret URLs

The file is public. Disallow: /private-admin-2/ tells everyone where to look. Protect private areas with a login instead.

Blocking every AI bot by name

Blocking OAI-SearchBot, Claude-SearchBot or PerplexityBot removes you from those assistants' answers. Block training crawlers only, unless that is really what you want.

[07] WHERE TO PUT IT

How to add robots.txt to your site.

Save the file as robots.txt (all lower case), in plain text with UTF-8 encoding, and upload it to the top-level folder your domain serves, the same folder as your homepage.
Open https://yourdomain.com/robots.txt in a browser. If you see your rules, crawlers can too. Each subdomain and each protocol (http and https) is a separate site with its own file.
[08] CHECKING IT WITH GOOGLE

Google's old robots.txt tester is gone. Here is what replaced it.

Google Search Console used to include a robots.txt Tester. Google retired it in December 2023 and replaced it with the robots.txt report, which shows the robots.txt files Google found for your site, when it last fetched them and any problems it had reading them, and lets you ask Google to recrawl a file you have just fixed. It no longer lets you test a URL against the rules.

That is the gap the tester above fills: paste any file, test any URL, and see the deciding rule. To confirm what Google does with a specific live page, use the URL Inspection tool in Search Console, which reports whether the page is blocked by robots.txt.

[09] QUESTIONS

Robots.txt questions, answered

How do I create a robots.txt file?+

Pick a starting point in the generator above, choose which crawlers to allow or block, add any folders to keep out and your sitemap URL, then copy or download the result. Save it as a plain text file named robots.txt and upload it to the root of your domain, so it is reachable at https://yourdomain.com/robots.txt. A robots.txt in a subfolder is ignored.

How do I check or test my robots.txt?+

Paste the file into the tester above, enter a URL or path, and choose a crawler. It tells you whether that crawler may fetch that URL, and which line decided it. It follows RFC 9309 and Google's documented rules. To check the file Google has actually fetched from your live site, use the robots.txt report in Google Search Console. To see which AI crawlers your live file lets in, use our AI Crawler Checker.

What does 'Disallow: /' do?+

It blocks the whole site for every crawler the group applies to. Under 'User-agent: *' it tells every well-behaved crawler, Google included, to stay out entirely, which removes the site from search over time. It is right for a staging site and a mistake almost everywhere else. The opposite, 'Disallow:' with nothing after it, allows everything.

How do I disallow all crawlers?+

Use 'User-agent: *' followed by 'Disallow: /'. Choose the 'Block everything' preset above to generate it. Remember that robots.txt is a request, not a lock: well-behaved crawlers honour it, but it does not stop anyone determined to fetch your pages, and it does not hide URLs that other sites already link to.

Does robots.txt stop a page from appearing in Google?+

Not reliably. Disallow stops Google crawling a page, but a blocked URL can still be indexed without its content if other pages link to it. To keep a page out of search results, allow it to be crawled and add a noindex robots meta tag or X-Robots-Tag header. Google has to be able to crawl the page to see the noindex.

Should I add my sitemap to robots.txt?+

Yes, it costs nothing and helps crawlers other than Google find it. Add a line such as 'Sitemap: https://example.com/sitemap.xml' anywhere in the file. It must be a full URL, and you can list more than one. Sitemap lines are not tied to a user-agent group.

What is the difference between Allow and Disallow?+

Disallow closes a path and Allow opens one. When both match a URL, the rule with the longer path wins, because it is more specific. So 'Disallow: /shop' with 'Allow: /shop/sale' keeps crawlers out of /shop but lets them into /shop/sale. If an Allow and a Disallow of exactly the same length both match, Allow wins.

Do wildcards work in robots.txt?+

Yes. '*' matches any sequence of 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. Google and Bing support both. Paths are case-sensitive, so '/Admin' and '/admin' are different rules.

Should I block AI crawlers like GPTBot and ClaudeBot?+

It depends on what the crawler does. Training crawlers such as GPTBot and ClaudeBot collect content for future models, and blocking them costs you no visibility today. Search crawlers such as OAI-SearchBot, Claude-SearchBot and PerplexityBot decide whether those assistants can cite you, and blocking them removes you from their answers. The 'Block AI training only' preset keeps you in AI answers while opting out of training.

Does Google respect Crawl-delay?+

No. Google ignores the Crawl-delay line. Bing honours it, which is why the generator writes it for Bingbot only. If Googlebot is putting too much load on your server, the fix is on the server side, for example by returning 429 or 503 responses temporarily.

How do I edit robots.txt in WordPress or Blogger?+

WordPress serves a virtual robots.txt until you replace it. Upload a real robots.txt file to your site's root, or edit it through your SEO plugin. In Blogger, go to Settings, then Crawlers and indexing, turn on 'Enable custom robots.txt', and paste the file. Pick WordPress or Blogger in the generator above to start from that platform's defaults.

Is robots.txt a security measure?+

No, and treating it as one backfires. The file is public, so listing '/secret-admin/' in it tells everyone where to look. Protect private areas with authentication. Use robots.txt only to manage what well-behaved crawlers spend their time on.

More free tools and reading

Letting crawlers in is step one. Being worth citing is step two.

A crawler that can reach your page still has to find it worth quoting. The free page checker runs 31 checks on any URL, and the visibility checker shows whether AI engines name you today.