SEO and marketing tools

Robots.txt Generator for Search and AI Crawlers

Create a robots.txt that keeps crawlers out of the paths you choose, opts out of AI training without leaving search, and is checked line by line as you build it.

  • Free foreverNo trial, no paywall, no usage limits.
  • No sign-upOpen the page and start. We never ask for an email to use a tool.
  • PrivateEverything runs in your browser. Your input is never uploaded or stored on our servers.
  • Works offlineOnce the page has loaded, the tool keeps working without a connection.

Start from a presetEach preset replaces the rules below. Hover or focus a preset to see what it does and when to use it.

Every crawler may fetch every page. The right start for most public sites.Opts out of AI model training (GPTBot, ClaudeBot, Google-Extended, Applebot-Extended, CCBot and more) while search engines and AI answer bots can still find and link your pages.WordPress's own default: keeps crawlers out of /wp-admin/ but lets admin-ajax.php work, plus the core sitemap.Blocks API routes and keeps /_next/ (your scripts and styles) crawlable so Google can render pages. Remove the /api/ rule if pages load their content from it in the browser.Asks every crawler to stay out. robots.txt doesn't keep pages out of the index if they are linked elsewhere, so also protect staging with a password or an X-Robots-Tag: noindex header.Disallows the whole site for every crawler that follows robots.txt.
Used to write the Sitemap line. Changing it updates sitemap URLs that point at the old site.

Rules by crawler

Each group names one or more crawlers (User-agent) and the paths they may or may not fetch. * means every crawler without a group of its own.

Group 1

Remove group 1
Product tokens separated by commas, such as Googlebot, Bingbot. Matching ignores case. Use * for every other crawler.
Crawlers may fetch URLs starting with this path.Crawlers should not fetch URLs starting with this path.
Remove rule
Seconds between requests. Google ignores it (Search Console manages Google's rate); Bing, Common Crawl and Anthropic honor it; Applebot and Amazon's crawlers don't.

AI and search crawlers

Tick a crawler to block it from the whole site. Tokens and descriptions come from each operator's own documentation.
BlockTick every crawler that collects AI training data. Search engines and AI answer bots stay allowed.Tick every AI crawler, AI search bot and user-triggered fetcher. Classic search engines stay allowed.
AI trainingCollect content that may train AI models. Blocking them opts you out of training without leaving search results.
Search and AI answersBuild search and AI-answer indexes that link back to you. Blocking them usually costs you visibility.
User-triggered fetchFetch a page because a person asked an assistant to. Several operators say these may not follow robots.txt.

Sitemaps

Full URLs of your sitemaps or sitemap index, one per line. The Sitemap line applies to every crawler, whatever group it sits near.

robots.txt

Upload this file to the root of your site, so it is served at https://your-site/robots.txt. It applies only to that host, protocol and port.
CopyDownload robots.txt
DoneValid robots.txt · 4 lines · 65 bytes

Test a URL

Checks the generated file with the same RFC 9309 matcher as Playxoft's robots.txt tester.
Allowedby on line 2

Checks

The generated file is parsed back the way crawlers read it, and checked for mistakes that change what they do.

No problems: crawlers will read this file exactly as intended.

Want an honest look at your site's SEO? Talk to our team

Quick answer

A robots.txt file tells crawlers which URLs on a site they may fetch. It sits at the site's root and groups Allow and Disallow rules by user agent. Playxoft's free robots.txt generator builds one from presets (WordPress, Next.js, staging, block AI training), lets you block AI crawlers such as GPTBot, ClaudeBot and Google-Extended by name, and checks every line against RFC 9309 as you type.

  • 6 presets
  • AI crawler directory
  • Operator docs linked
  • Live RFC 9309 checks
  • Test a URL
  • Crawl-delay notes
  • Copy and download

How to use the Robots.txt Generator

  1. 1Pick a preset, such as Allow everything, Block AI training or WordPress.
  2. 2Enter Your site so the Sitemap line points at your domain.
  3. 3Edit Rules by crawler: name the user agents, then add Allow or Disallow paths that start with /.
  4. 4Tick crawlers under AI and search crawlers to block them from the whole site. Each one links to its operator's documentation.
  5. 5Read the Checks and use Test a URL to confirm a path is allowed or blocked.
  6. 6Click Download and upload robots.txt to your site's root, so it opens at https://your-site/robots.txt.

What is a robots.txt file?

robots.txt is a plain-text file at the root of a host that asks crawlers to stay away from some URLs. The format was standardized in 2022 as RFC 9309, the Robots Exclusion Protocol. A file is made of groups: one or more User-agent lines followed by Allow and Disallow rules.

User-agent: *
Disallow: /admin/
Allow: /admin/help/

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

Every crawler without a group of its own follows the * group. Rules match the start of the URL path, and the longest matching rule wins, so /admin/help/start is allowed while /admin/settings is blocked. The file applies only to the exact host, protocol and port it is served from: shop.example.com needs its own.

Two limits matter. robots.txt is a request, not a lock: the RFC says its rules "are not a form of access authorization", so protect private pages with a login. And it controls crawling, not indexing: Google can still list a blocked URL it finds through links, without a description. To keep a page out of results, let it be crawled and add a noindex robots meta tag.

How do I block AI crawlers but stay in search results?

Most AI companies now separate the crawler that gathers training data from the ones that power their search and answers, so you can opt out of one and keep the others. These are the training controls, from each operator's own documentation:

TokenOperatorWhat a Disallow does
GPTBotOpenAIContent isn't used to train its foundation models
ClaudeBotAnthropicFuture content is excluded from training data
Google-ExtendedGoogleNo Gemini training or grounding; Search is unaffected
Applebot-ExtendedAppleNo training of Apple's foundation models
CCBotCommon CrawlStays out of its open archive, which anyone can download
AmazonbotAmazonStops a crawler whose data may train Amazon AI models
meta-externalagentMetaStops Meta's crawler for AI training and indexing

The Block AI training preset writes exactly this:

User-agent: *
Allow: /

# Opt out of these crawlers (see each operator's documentation)
User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
User-agent: CCBot
User-agent: Amazonbot
User-agent: meta-externalagent
Disallow: /

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

Search and answer bots such as OAI-SearchBot, Claude-SearchBot and PerplexityBot stay allowed, so you can still be found and cited. Anthropic, for example, documents a separate bot for each job: ClaudeBot for training, Claude-SearchBot for search and Claude-User for questions users ask. Note that Google-Extended and Applebot-Extended are control tokens, not crawlers: Google and Apple crawl with their usual bots and check the token before using your pages for AI. Fetchers that act for a user, like ChatGPT-User and Perplexity-User, may not follow robots.txt at all, OpenAI and Perplexity say. Microsoft has no robots.txt token for Bing's AI features; it uses the nocache and noarchive meta tags instead.

What robots.txt do WordPress and Next.js sites need?

WordPress serves a virtual robots.txt that blocks the dashboard but keeps admin-ajax.php reachable, because themes and plugins call it from public pages. The WordPress preset matches it, with the core wp-sitemap.xml. If an SEO plugin writes your sitemap, point the Sitemap line at its URL instead.

For Next.js, never block /_next/: it holds the JavaScript and CSS Google needs to render your pages. Block API routes if you like, or generate the file from code:

// app/robots.ts
import type { MetadataRoute } from "next";

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [{ userAgent: "*", allow: "/", disallow: "/api/" }],
    sitemap: "https://example.com/sitemap.xml",
  };
}

For a staging site, Disallow: / keeps polite crawlers out, but it doesn't stop indexing of URLs that leak through links. Put staging behind a password, or send an X-Robots-Tag: noindex header.

Does Google support crawl-delay or noindex in robots.txt?

Neither. Google's parser reads only user-agent, allow, disallow and sitemap, and Google retired its handling of unsupported rules such as noindex on September 1, 2019. Other crawlers differ on Crawl-delay (seconds between requests):

CrawlerHonors Crawl-delay?
GooglebotNo
BingbotYes
CCBot (Common Crawl)Yes
Anthropic's crawlersYes
ApplebotNo
AmazonbotNo

If Googlebot is overloading your server, Google's advice is to return 500, 503 or 429 status codes for a few hours to a day or two, which makes it crawl more slowly; then go back to 200.

What are the most common robots.txt mistakes?

  • A blank line doesn't end a group. Two User-agent lines separated by an empty line still share the rules after the second one. The generator writes Allow: / for a group with no rules so it can't merge by accident.
  • **A named group replaces *.** Once User-agent: Googlebot has a group, Googlebot ignores everything in the * group. Repeat the rules it should keep.
  • Paths must start with `/`. Disallow: admin never matches anything, and neither does a full URL.
  • Prefixes match more than you think. Disallow: /blog also blocks /blog-tips. Use /blog/, or /blog$ for that exact URL.
  • Blocking CSS and JavaScript stops Google rendering your pages properly.
  • Size. Google reads only the first 500 KiB, the minimum RFC 9309 requires parsers to handle; rules after that are ignored.

Every one of these is flagged in Checks with the line to fix. To try a live file, use the robots.txt tester.

Frequently asked questions

Write plain-text groups of User-agent lines followed by Allow and Disallow rules, save the file as robots.txt in UTF-8, and upload it to the root of your site so it loads at https://your-site/robots.txt. A generator like this one writes the file for you from presets and checks every line.
Add a group naming the training crawlers, such as User-agent: GPTBot, ClaudeBot, Google-Extended, Applebot-Extended and CCBot, each on its own line, followed by Disallow: /. Keep OAI-SearchBot, Claude-SearchBot and PerplexityBot allowed if you still want to appear in AI search answers.
No. Google says Google-Extended does not affect inclusion or ranking in Google Search. It only controls whether Google may use your content to train future Gemini models and to ground answers in Gemini Apps and Vertex AI. Search crawling is controlled by Googlebot.
In the top-level directory of each host, so it is served at /robots.txt. Crawlers never look in subfolders, and a file on example.com does not cover www.example.com, a subdomain, another protocol or a non-standard port.
Not reliably. Disallow stops crawling, but Google can still index a blocked URL that other pages link to, showing it without a description. To keep a page out of search results, allow crawling and add a noindex robots meta tag or X-Robots-Tag header, or put it behind a login.
No. robots.txt is a voluntary standard, and RFC 9309 says its rules are not access authorization. Major search engines and AI crawlers document that they follow it, but several operators say fetchers acting for a user, such as ChatGPT-User and Perplexity-User, may not. Use authentication or a firewall for anything that must stay private.
Yes. It is free, needs no sign-up and runs entirely in your browser. Your rules and site URL are never uploaded, and analytics records only that the tool was used.

Last updated by the Playxoft engineering team.

From the team behind this tool

Doing the SEO checklist and still not getting traffic?

Meta tags and sitemaps are the floor, not the strategy. We build fast websites that rank, fix the technical SEO that holds pages back and run campaigns you can measure. Send us your site and get a free, honest audit of what would move the needle.

More free tools

See all tools