ToolBrainy

Create robots.txt File Online Free

Create a custom robots.txt file for your website in seconds, decide exactly which AI crawlers may use your content, and test any URL against any site's live rules. Set crawler rules, allow and disallow paths, add your sitemap — then generate and download the file instantly. No signup.

Bot Rules Add one block per crawler. Use * to target all bots.
Sitemap URLs
Live

About this tool

This tool does three jobs that usually need three separate tools. The Generate tab builds a properly formatted robots.txt file without writing any code — choose the bots you want to configure, add the paths to block or allow, and include your sitemap URL, with a live preview that updates as you type. The AI Crawlers tab turns the confusing world of GPTBot, ClaudeBot, PerplexityBot and Google-Extended into a set of deliberate choices, telling you in plain English what each block actually costs you. The Test & Validate tab checks any URL against any site's rules and shows you the exact line that decides the outcome.

The builder, the AI crawler panel and the rule matcher all run inside your browser — nothing you type is uploaded. The one exception is the "Load a live site's robots.txt" button: browsers are not allowed to read another domain's files directly, so that request passes through our server. Only the domain you enter is sent, and the fetched file is cached for five minutes.

Reviewed by the ToolBrainy Team · Rule matching runs in your browser · Last updated August 2026

How to use

1
Choose a bot

Select a user-agent such as * (all bots) or Googlebot from the dropdown.

2
Add path rules

Click "Add path" under Disallow or Allow to control which pages crawlers can visit.

3
Download

Copy the result or click "Download robots.txt" and upload it to the root of your site.

Why use it

Multiple bot blocks

Configure separate rules for Googlebot, Bingbot, GPTBot, and any custom crawler.

Live preview

See the final robots.txt format update in real time as you make changes.

Sitemap support

Add one or more sitemap URLs so search engines can discover your content quickly.

AI crawler control

Block GPTBot, ClaudeBot, PerplexityBot, CCBot and more — with a plain-English note on exactly what each block costs you.

Test any URL, any site

Check whether a URL is crawlable and see the exact rule that decides it — the feature Google removed from Search Console in 2023.

Catches costly mistakes

Flags a stray Disallow: /, blocked CSS and JavaScript, missing sitemaps and directives Google stopped supporting.

Runs in your browser

Rules are built and matched locally. Only the "fetch a live site" button talks to our server, because browsers cannot read another domain's files.

Use cases

Block admin pages

Prevent crawlers from indexing /admin, /login or /dashboard URLs.

Block AI scrapers

Add GPTBot and ChatGPT-User blocks to keep your content out of AI training data.

Protect staging sites

Disallow everything with a wildcard rule to prevent staging URLs from appearing in search.

Speed up indexing

Include your sitemap URL so Google and Bing discover new pages faster.

Per-bot control

Allow Googlebot full access while blocking Bingbot from specific sections.

E-commerce SEO

Block cart and checkout pages to focus crawl budget on product and category pages.

What is robots.txt?

Robots.txt is a small plain-text file that lives in the root folder of your website, at an address like https://yourdomain.com/robots.txt. Its job is to tell search-engine crawlers which parts of your site they are welcome to visit and which parts they should leave alone. When a crawler such as Googlebot arrives, checking this file is usually the first thing it does.

The file follows the Robots Exclusion Protocol, a long-standing agreement that the major search engines respect. Each robots.txt file is built from one or more groups of rules. A group starts by naming a crawler with a User-agent line, then lists the paths that crawler may or may not request. It is a set of polite instructions rather than a lock, so it works best for guiding well-behaved bots, not for keeping secrets.

How robots.txt works

Before a crawler fetches your pages, it downloads your robots.txt file and reads the rules that apply to it. Each rule is a single line made up of a directive and a value. Here are the directives you will actually use:

  • User-agent — names the crawler a group of rules applies to. * means every bot.
  • Disallow — a path that the named crawler should not request. Disallow: / blocks the whole site.
  • Allow — an exception that opens a path back up, even inside a blocked folder.
  • Sitemap — the full URL of your XML sitemap so crawlers can find your pages faster.

A crawler matches paths from left to right, and the most specific rule wins. In the example below, the whole /private/ folder is closed off, but one file inside it stays open.

Example
User-agent: *
Disallow: /private/
Allow: /private/public-notice.html

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

One line worth remembering: robots.txt controls crawling, not indexing. It asks a bot not to fetch a page. If you need a page kept out of search results, use a noindex meta tag instead, which we explain further down.

Why robots.txt matters for SEO

Search engines give every site a rough crawl budget — the number of pages they will fetch in a given period. A tidy robots.txt file helps them spend that budget on the pages you actually want ranked. This matters more as a site grows and picks up thin or duplicate URLs that add nothing to search results.

  • Focus crawl budget. Keep bots away from cart, filter and internal search pages so they reach your real content sooner.
  • Reduce server load. Blocking heavy or endless URL patterns stops aggressive crawling from slowing your site down.
  • Point to your sitemap. A sitemap line helps engines discover new and updated pages quickly.
  • Cut duplicate crawling. Steering bots away from tag archives and print versions reduces wasted requests.

Used carefully, robots.txt is a quiet SEO win. Used carelessly, a single wrong line can hide your best pages, so it pays to check your rules before you publish them.

AI crawlers and robots.txt

Robots.txt used to be a conversation with search engines. It is now also how you talk to AI companies. OpenAI, Anthropic, Google, Apple, Meta, Perplexity and others all publish user-agent names and say they honour robots.txt, which makes this small file the main lever site owners have over how their content is used.

The mistake almost everyone makes is treating "AI bots" as one group and blocking all of them. They are not one group. They fall into two categories that pull in opposite directions.

Training crawlers: blocking these costs you nothing

These collect text to train models. They do not send you visitors, and blocking them has no effect on how you rank or whether you get cited anywhere. If your only concern is your work being used as training data, these are the ones to block.

  • GPTBot — OpenAI's training crawler. Blocking it does not stop ChatGPT citing you.
  • ClaudeBot — Anthropic's training crawler, separate from the agents that fetch pages for users.
  • Google-Extended — not a crawler at all. It is a switch telling Google whether content Googlebot already fetched may be used to train and ground Gemini. Blocking it has zero effect on Google Search rankings or indexing. This is the safest AI block a site owner can make, and the one most people are afraid to touch.
  • Applebot-Extended — the same idea for Apple Intelligence. Siri and Spotlight use the separate Applebot crawler, so blocking the "Extended" token does not remove you from Apple's search features.
  • CCBot — Common Crawl. It does not train a model itself, it builds the open dataset that a large number of AI companies train on. One rule here cuts off many models at once, which makes it the highest-leverage block on this list.
  • Bytespider, Meta-ExternalAgent, Amazonbot, cohere-ai, Diffbot, AI2Bot — training crawlers for ByteDance, Meta, Amazon, Cohere, Diffbot and academic research respectively.

Answer engines: blocking these costs you traffic

These index or fetch your pages so that a real person gets your content, with a visible link back to you. They are a referral channel, and an increasingly important one. Blocking them is the AI equivalent of blocking Googlebot.

  • OAI-SearchBot — indexes pages so ChatGPT search can surface and link to them. Distinct from GPTBot.
  • ChatGPT-User — fetches a page live when someone asks ChatGPT about that specific URL. Block it and anyone pasting your link into ChatGPT gets an error.
  • Claude-SearchBot and Claude-User — the same split for Anthropic: one indexes for citations, one fetches on a user's request.
  • PerplexityBot and Perplexity-User — Perplexity shows prominent clickable sources, so citations here convert to visits.
  • YouBot — You.com's answer index.

The rule of thumb

If a bot's job is to learn from your content, blocking it is free. If its job is to show your content to a person, blocking it costs you a visitor. That is why the AI Crawlers tab above offers "Block training, keep answer engines" as its recommended preset — it is the setting most publishers actually want, and almost no tool offers it in one click.

Block AI training, keep the answer engines
User-agent: GPTBot
Disallow: /

User-agent: ClaudeBot
Disallow: /

User-agent: Google-Extended
Disallow: /

User-agent: Applebot-Extended
Disallow: /

User-agent: CCBot
Disallow: /

User-agent: *
Disallow:

Two caveats worth knowing. First, this is voluntary — robots.txt is an instruction, not a lock, and a bot that ignores it faces no technical barrier. If content must not be taken, put it behind a login. Second, blocking a training crawler does not remove anything a model already learned; it only applies to future crawls.

Common robots.txt mistakes

Most robots.txt problems come from a few repeat offenders. Watch out for these:

  • Blocking the entire site by accident. A stray Disallow: / left over from a staging setup can wipe you out of search.
  • Expecting it to hide private data. Anyone can open your robots.txt, so listing a secret folder there simply advertises it. Use passwords or server rules for anything sensitive.
  • Blocking CSS and JavaScript. Google needs these files to render your pages. Blocking /wp-includes/ or asset folders can hurt how your pages are understood.
  • Assuming Disallow removes a page. A blocked URL can still appear in results if other sites link to it. Removing a page from search needs noindex, not Disallow.
  • Case and slash slips. Paths are case-sensitive, and /Folder is not /folder. A trailing slash also changes the match.
  • Putting the file in the wrong place. It only works at the domain root, never in a subfolder.

Robots.txt examples

Real files are usually short. Here are the patterns you will reach for most often — copy one as a starting point and adjust the paths to match your site.

Allow every crawler everywhere
User-agent: *
Disallow:
Block the whole site (useful for staging)
User-agent: *
Disallow: /
Block a few folders but allow the rest
User-agent: *
Disallow: /cart/
Disallow: /checkout/
Disallow: /search/

Sitemap: https://yourdomain.com/sitemap.xml
Allow Googlebot, block a specific bot
User-agent: Googlebot
Disallow:

User-agent: AhrefsBot
Disallow: /
Keep an AI scraper out of your content
User-agent: GPTBot
Disallow: /

User-agent: *
Disallow:

WordPress robots.txt example

WordPress creates a virtual robots.txt automatically, so a fresh install already has one even if there is no file on the server. It is basic, but for most sites it is enough. If you want more control, you can replace it with your own rules. A sensible starting point for a WordPress site looks like this:

robots.txt for WordPress
User-agent: *
Disallow: /wp-admin/
Allow: /wp-admin/admin-ajax.php

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

Notice that /wp-admin/ is blocked while admin-ajax.php stays open, because some themes and plugins rely on it to load content. Avoid blocking /wp-includes/ or your uploads folder — doing so can stop Google from rendering your pages properly. If you use an SEO plugin like Yoast, Rank Math or All in One SEO, each one has a built-in robots.txt editor, so you can paste these rules straight into the dashboard without touching FTP.

Robots.txt best practices

  • Keep it simple. Only add rules you understand. A short, clear file is easier to maintain and less likely to break.
  • Always include your sitemap. One Sitemap line helps search engines find everything worth crawling.
  • Never block CSS, JS or images you want rendered. Blocking them can change how your pages are judged.
  • Use noindex for pages you want out of search. Reach for robots.txt to manage crawling, not to remove indexed pages.
  • Match paths carefully. Remember that rules are case-sensitive and that a trailing slash matters.
  • Test before and after every change. A quick check saves you from a costly mistake.
  • Review it now and then. As your site changes, old rules can quietly block the wrong things.

How to upload robots.txt

Once you have generated your rules above, getting the file live takes only a minute. The exact steps depend on how you manage your site:

  • Save the file. Copy your rules into a new plain-text file named exactly robots.txt — all lowercase, nothing extra.
  • Upload it to the root. Using FTP or your hosting file manager, place it in the top-level folder (often public_html) so it opens at yourdomain.com/robots.txt.
  • On WordPress, use a plugin. Yoast, Rank Math and AIOSEO each include a robots.txt editor, so you can paste and save your rules without any file transfer.
  • Confirm it works. Visit yourdomain.com/robots.txt in your browser. If your rules show up, you are done.

How to test robots.txt

Google retired its robots.txt Tester in December 2023. The report that replaced it, inside Search Console, only shows the last version Google fetched for a property you have verified — it dropped the interactive "does this URL match these rules" check entirely, and you can no longer test another site's file at all. That is the gap the Test & Validate tab above fills.

Testing takes seconds and catches mistakes before search engines act on them. A few ways to check your file:

  • Use the tester above. Paste your rules or fetch any live domain, drop in a list of URLs, pick a crawler, and every URL is marked allowed or blocked with the exact line that decided it. It follows Google's matching rules: the longest matching path wins, and a tie goes to Allow.
  • Open it directly. Load yourdomain.com/robots.txt and read the rules. It should return the file, not a 404.
  • Use Google Search Console. The URL Inspection tool still tells you whether one specific page on your own verified property is blocked, and the robots.txt report shows fetch errors.
  • Check a competitor's file. Fetching another site's robots.txt shows you which sections they keep out of search and which AI crawlers they allow — often a faster read on their strategy than any tool.
  • Re-check after every edit. Search engines cache the file, so confirm the new version is live and test the paths you care about.

Frequently asked questions

What is a robots.txt file?

A robots.txt file sits at the root of your website and tells search-engine crawlers which pages or sections they are allowed or not allowed to visit. It follows the Robots Exclusion Standard and is read by bots before they crawl your site.

Does robots.txt actually block crawlers?

Well-behaved crawlers like Googlebot and Bingbot respect robots.txt rules. However, it is not a security measure. Malicious bots may ignore the file entirely. Use server-level access controls or password protection for truly private content.

What does User-agent: * mean?

The asterisk * is a wildcard that matches all crawlers. Rules under this block apply to every bot that reads the file, unless a more specific user-agent block overrides them.

Where do I upload robots.txt?

Place the file at the root of your domain, for example https://yourdomain.com/robots.txt. It must be accessible at exactly that URL for crawlers to find it.

Can I create a robots.txt file just for Googlebot?

Yes. Add a dedicated block that starts with User-agent: Googlebot and give it its own Allow and Disallow lines. Google's crawler follows the most specific matching block, so those rules apply to Googlebot while your User-agent: * block still covers every other crawler. This tool lets you add per-crawler blocks so you can, for example, let Googlebot into a folder you block for everyone else.

How do I create a custom robots.txt file for Blogger?

Build your rules with the generator above, then in your Blogger dashboard go to Settings → Crawlers and indexing → Enable custom robots.txt, and paste the generated file. A custom robots.txt for Blogger (Blogspot) lets you control which pages Googlebot crawls, block search and label pages, and point crawlers to your sitemap for faster, cleaner indexing.

How do I add a robots.txt file to WordPress?

WordPress serves a virtual robots.txt by default. To use a custom one, generate your rules here and either upload a robots.txt file to your site root via FTP, or paste the rules into your SEO plugin — Yoast, Rank Math and AIOSEO all include a robots.txt editor. This gives you full control over crawling rules and sitemap discovery for your WordPress site.

Will robots.txt remove my page from Google?

No. A Disallow rule only asks a crawler not to fetch the page. If other sites link to that URL, it can still show up in results, often without a description. To keep a page out of search, add a noindex meta tag or use the removal tool in Search Console, and make sure the page is not blocked so Google can actually read the noindex.

How often do search engines check robots.txt?

Crawlers cache the file, so changes are not picked up instantly — Google typically refreshes it within about a day. Because of this, always confirm your new version is live and give it a little time before assuming a rule has taken effect. Google also reads only the first 500KB of the file, which is far more than a normal robots.txt needs.

What is the difference between robots.txt and a meta robots tag?

Robots.txt works at the site level and controls crawling — whether a bot may request a URL at all. A meta robots tag (or the X-Robots-Tag header) works at the page level and controls indexing — whether a page may appear in search. Use robots.txt to manage crawl budget, and use noindex when you specifically want a page kept out of results.

How do I block ChatGPT from using my website?

It depends which part of ChatGPT you mean, because OpenAI runs three separate bots. GPTBot collects content to train models. OAI-SearchBot indexes pages so ChatGPT search can link to them. ChatGPT-User fetches a page live when someone asks about that URL. Blocking GPTBot keeps you out of training data while leaving your ChatGPT citations and referral traffic intact — that is what most people actually want. Blocking all three removes you from ChatGPT entirely. Use the AI Crawlers tab above to pick deliberately.

Does blocking Google-Extended hurt my Google rankings?

No. Google-Extended is not a crawler and has no role in Search. It is a robots.txt token that controls whether content Googlebot has already fetched may be used to train and ground Gemini. Google states that blocking it does not affect how a site is crawled, indexed or ranked in Google Search. It is the lowest-risk AI block available, which is why the "Block training, keep answer engines" preset includes it.

Should I block AI crawlers at all?

There is no single right answer, but the useful distinction is what a bot does with your content. Training crawlers like GPTBot, ClaudeBot, CCBot and Google-Extended learn from your pages and send you nothing, so blocking them has no traffic cost. Answer engines like OAI-SearchBot, PerplexityBot and Claude-SearchBot cite your pages with a clickable link, so blocking them removes a growing referral channel. Publishers who sell access to their archive tend to block training. Sites that want reach tend to keep the answer engines open.

Do AI crawlers actually obey robots.txt?

The major ones say they do, and there is reasonable evidence that OpenAI, Anthropic, Google, Apple and Perplexity honour it. But robots.txt is a request, not a technical barrier — a bot that ignores it faces nothing stopping it, and some crawlers have been accused of doing exactly that. Treat robots.txt as the polite, standard way to state your position. If content genuinely must not be taken, put it behind a login or paywall rather than a crawl rule.

How do I test whether a URL is blocked by robots.txt?

Open the Test & Validate tab above, paste your rules or fetch a live domain, enter the URLs you want to check one per line, and choose which crawler to test as. Each URL comes back allowed or blocked along with the exact directive and line number that decided it. The matching follows Google's specification: user-agent groups are matched by longest name, then the longest matching path wins, and when an Allow and a Disallow tie, Allow wins.

Can I check another website's robots.txt file?

Yes. Every robots.txt file is public by design. Enter any domain in the Test & Validate tab and the tool loads that site's live file, audits it for problems and shows you which AI crawlers it currently blocks. It is a quick way to see how competitors handle crawl budget and AI access. Google's own Search Console cannot do this — it only shows files for properties you have verified.

Why did Google remove the robots.txt Tester?

Google retired the standalone robots.txt Tester in December 2023 as part of deprecating the last of the old Search Console tools. It was replaced by a robots.txt report that lists the files Google fetched for your verified property and any errors it hit, but that report does not let you test a URL against a set of rules, and it cannot look at a site you do not own. The tester above restores both of those abilities.

Related tools