Robots.txt Generator

Generate a robots.txt file. Choose whether crawlers and AI bots may access your site, add your sitemap, then copy the result to your site root.

Updated

SEO Tools● Free No upload Instant

Loading Robots.txt Generator…

Your browser is preparing the tool. It runs 100% locally.

Quick answer

Choose whether to allow all crawlers and whether to explicitly allow AI bots (GPTBot, ClaudeBot, PerplexityBot and Google-Extended), add your sitemap URL, and the tool writes a robots.txt for your site's root. robots.txt is the standard way to guide crawlers, defined in RFC 9309, but it is advisory. Well-behaved bots obey it, and blocking a page doesn't guarantee it stays out of search. The file is generated in your browser.

What the Robots.txt Generator does

The tool produces a short, valid robots.txt. It contains a User-agent star block set to Allow / or Disallow / by the first toggle, optional Allow blocks that name the major AI crawlers, and a Sitemap line pointing at your XML sitemap. Save it as robots.txt at the root of your domain.

With the AI toggle on, the file states outright that GPTBot (OpenAI), ClaudeBot (Anthropic), PerplexityBot and Google-Extended (Google's AI training) are allowed. Crawlers that honour robots.txt get a clear, public statement of your position.

How it works

robots.txt is plain text with a fixed grammar. A User-agent line names a crawler, and Allow or Disallow lines set what it may fetch, with a path of / meaning the whole site. The tool builds those lines from your toggles and adds the Sitemap directive so crawlers can find your URL list.

The file has exactly one home, yourdomain.com/robots.txt, and crawlers read it before fetching other pages. It became an official internet standard (RFC 9309) in 2022, formalising a convention that had been in use since 1994.

Generation algorithm

  1. Set the crawler rule. With allow all on, User-agent star gets Allow /. With it off, the rule becomes Disallow /, which asks crawlers to stay away.
  2. Add AI bots (optional). If enabled, append explicit Allow blocks for GPTBot, ClaudeBot, PerplexityBot and Google-Extended.
  3. Add the sitemap. Append a Sitemap line pointing at your XML sitemap URL.
  4. Output live. The finished robots.txt appears as you change the toggles, ready to copy to your site root.

What it outputs

User-agent: * Allow: / (or Disallow: / when 'allow all' is off) (optional) Allow blocks for GPTBot, ClaudeBot, PerplexityBot, Google-Extended Sitemap: your-sitemap-URL

The file can allow or disallow the whole site, with no per-path rules or crawl-delay. Switching the AI toggle off removes the explicit allow blocks but adds no Disallow, so those bots still follow the User-agent star rule.

Technical details

Inputssitemap URL, allow-all toggle, allow-AI toggle
OutputUser-agent star rule, optional AI allow blocks, Sitemap line
Granularityallow-all or disallow-all (no per-path rules)
AI bots namedGPTBot, ClaudeBot, PerplexityBot, Google-Extended
File locationyourdomain.com/robots.txt (root only)
Where it runsGenerated in your browser, never uploaded

Standards and references

  • Robots Exclusion Protocol (RFC 9309): The robots.txt standard, an official IETF specification since 2022. Compliant crawlers follow the rules, but the file gives guidance and doesn't control access.
  • Disallow is not noindex: A blocked URL can still be indexed if other pages link to it, often with no snippet. To keep a page out of search, use a noindex meta tag and leave the page crawlable.
  • AI crawler tokens: The file names GPTBot (OpenAI), Google-Extended (Google AI), ClaudeBot (Anthropic) and PerplexityBot. Some AI crawlers ignore robots.txt completely.

Accuracy and limits

robots.txt is advisory. Reputable crawlers such as Google and Bing obey it, but the file enforces nothing, and some bots, including certain AI scrapers, ignore it. It asks crawlers to behave a certain way and can't lock them out.

Disallow is not the same as noindex. A page blocked in robots.txt can still appear in search if other sites link to it, and Google then shows it without a description. To keep a page out of search, use a noindex meta tag and leave the page crawlable, so don't block it here. Google has ignored noindex inside robots.txt since 2019.

Switching off 'Allow AI bots' doesn't block them. It removes the explicit Allow blocks, and those crawlers fall back to User-agent star, so they are still allowed while 'allow all' is on. Blocking an AI bot needs a Disallow rule for it, and this tool doesn't write one.

The tool only allows or disallows the whole site. To block a single folder, add a crawl-delay or set rules for one bot (apart from the AI block), edit the file by hand.

The file must sit at the root, as yourdomain.com/robots.txt. A robots.txt in a subfolder is ignored, and the Sitemap line should be a full absolute URL.

Real-world uses

New site setup

Create a first robots.txt that allows crawling and points at your sitemap.

Declaring an AI stance

State openly that AI training crawlers are allowed, or edit the file afterwards to block them.

Staging sites

Switch to Disallow / to ask crawlers to skip a site that isn't ready.

Pointing to the sitemap

Add the Sitemap directive so crawlers discover your URL list.

When it fits, and when it doesn't

Good for

  • A simple allow-all robots.txt with a sitemap line
  • Explicitly allowing the major AI crawlers
  • Discouraging crawling of a staging site
  • Learning robots.txt structure

Not the best choice for

  • Blocking specific folders or URLs (no per-path rules)
  • Keeping a page out of search (use noindex)
  • Actually blocking AI bots (it only allows them)
  • Crawl-delay or per-bot fine-tuning

To keep a page out of Google, use a noindex meta tag instead of robots.txt. For per-folder rules or to block a particular bot, generate the base file here and edit it by hand.

Frequently asked questions

What is robots.txt for?
It is a file at your site's root that tells crawlers which parts of the site they may fetch. RFC 9309 defines it as the standard way to guide search engines and other bots.
Does blocking a page in robots.txt hide it from Google?
Not reliably. A blocked page can still be indexed if other sites link to it, shown without a snippet. To keep it out of search, use a noindex meta tag and leave the page crawlable.
Does turning off 'Allow AI bots' block them?
No. It only removes the explicit allow lines; those bots then match the User-agent star rule. To block one, add a Disallow rule for it by hand.
Which AI bots does it name?
GPTBot (OpenAI), ClaudeBot (Anthropic), PerplexityBot and Google-Extended (Google's AI training crawler).
Will every bot obey this file?
No. Reputable crawlers do, but robots.txt is advisory, and some scrapers, including certain AI crawlers, ignore it completely.
Where do I put the file?
At the root, as yourdomain.com/robots.txt. Crawlers ignore it anywhere else, and each domain has one.
Can I block just one folder?
Not with this tool, which only allows or disallows the whole site. Add a Disallow line for the folder by hand.
What does the Sitemap line do?
It tells crawlers where your XML sitemap is, so they can find all your URLs. Use the full absolute URL.
Is Disallow / a good way to take a site offline from search?
It asks crawlers to stop, but pages they already know about can stay in the index for a while. For a private site, use a login or noindex as well as robots.txt.
Does Google read noindex in robots.txt?
No. Google dropped support for noindex directives in robots.txt in 2019. Use a noindex meta tag on the page instead.
Is robots.txt case-sensitive?
The paths are. /Folder/ and /folder/ are different, so match your real URL casing.
Is anything uploaded?
No. Your browser builds the file. Save it and upload it to your own site root.

References

The generated file is valid robots.txt with a sitemap line and optional AI-bot allow blocks. The page also explains three limits: robots.txt is advisory, Disallow is not noindex, and switching the AI toggle off doesn't block those bots.

PopularHot

Meta Tag Generator

Fill in your page title, description, keywords and author, and the tool writes a block of HTML head meta tags you can paste, with the title, description, viewport and robots tags included. The block updates as you type.

SEOOpen Tool
Trending

Open Graph Generator

Generate Open Graph meta tags so your page shows a proper title, description and image when shared on Facebook, LinkedIn, WhatsApp and more. Fill four fields and copy the block.

SEOOpen Tool
Trending

SERP Snippet Preview

Type a title, URL and meta description to see roughly how your page could look in Google, cut to length the way a real result is.

SEOOpen Tool

Slug Generator

Turn a title or phrase into a lowercase, hyphenated URL slug, the readable tail of a web address. It updates as you type, in your browser.

SEOOpen Tool

Readability Checker

Paste your text to get its Flesch Reading Ease score and US grade level, the two classic readability measures, updated as you type.

SEOOpen Tool
PopularHot

Image Compressor

Compress an image to JPEG with a quality slider and watch the file size drop as you drag, in your browser.

ImageOpen Tool

Back to the Robots.txt Generator

Generate as many as you need at the top of the page. It runs on this device and needs no account.