Technical SEO tool

Robots.txt Generator

Create a robots.txt file in a few clicks: choose a user-agent, add Disallow and Allow paths, point crawlers to your sitemap and, if you want, opt out of AI training crawlers. The file updates as you type.

Rules

Paths are case-sensitive and start with /. Use * for any characters and $ for the end of the URL, e.g. /*.pdf$. An empty Disallow blocks nothing.

Block AI crawlers optional, adds a separate group for each

None of these affect Google or Bing search rankings. Blocking PerplexityBot means your pages are less likely to be cited as sources in Perplexity answers.

robots.txt

In short: robots.txt is a plain-text file at the root of your domain that tells crawlers which URLs they may fetch. To create robots.txt, write one group per user-agent with Disallow and Allow lines, add a Sitemap line, and upload the file to https://yourdomain.com/robots.txt. It manages crawling only; it does not keep pages out of the index.

Where to place the robots.txt file

The file must sit at the root of the host and be named exactly robots.txt in lowercase. https://example.com/robots.txt covers only that host and protocol. https://shop.example.com needs its own file, and so does http:// if it serves content instead of redirecting. A copy in a subfolder such as /blog/robots.txt is ignored.

The response code matters too. A 404 or 410 means "no restrictions", so a missing file is harmless. A 5xx error is different: Google pauses crawling of the whole site, and if the error lasts more than 30 days it falls back to the last good copy it has. Google reads the first 500 KiB of the file and generally caches it for up to 24 hours, so changes are not instant. Save it as UTF-8 plain text.

A robots.txt example you can adapt

This is a typical file for a WordPress site with internal search and faceted filters, which keeps crawlers out of endless parameter combinations while leaving the AJAX endpoint that many themes need reachable:

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

User-agent: GPTBot
Disallow: /

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

Two details catch people out. First, a crawler obeys only the most specific group that names it, so GPTBot above ignores the * group entirely; if you give a bot its own group, repeat any rules it should also follow. Second, when an Allow and a Disallow both match a URL, Google applies the longer (more specific) path, and Allow wins a tie. That is why /wp-admin/admin-ajax.php stays open. Never block CSS and JavaScript files your pages need: Google renders pages, and blocked resources can make a page look broken to it.

robots.txt is not for hiding pages: use noindex

This is the most common robots.txt mistake. Disallow stops Google from fetching a URL, but if other sites link to it, the URL can still appear in results with a "No information is available for this page" note. Worse, if you add a noindex tag to a page and also block it in robots.txt, Google never sees the tag, so the page can stay indexed. To remove a page from search, leave it crawlable and send <meta name="robots" content="noindex"> or the X-Robots-Tag: noindex header. For private content, use a password. The file itself is public, so listing secret paths in it only advertises them.

AI crawler user-agents and what blocking them does

AI companies publish separate user-agent tokens so you can opt out of some uses without leaving search. The main ones, as documented by each company:

User-agentOperatorWhat a Disallow affects
GPTBotOpenAICollection of content for training models. ChatGPT search uses a different bot, OAI-SearchBot, so blocking GPTBot alone does not remove you from ChatGPT search results.
ClaudeBotAnthropicCollection of content for training. Anthropic lists Claude-SearchBot for search and Claude-User for fetches a user asks for as separate tokens.
Google-ExtendedGoogleNot a separate crawler: a control token. Googlebot still crawls, but the content is not used to train or ground Gemini. No effect on Google Search, rankings or AI Overviews.
PerplexityBotPerplexityIndexing for Perplexity's answer engine, which links to sources. Perplexity-User handles fetches triggered by a user question and Perplexity says it generally ignores robots.txt.
CCBotCommon CrawlThe open web archive that many AI datasets are built from.

Keep in mind that robots.txt is a voluntary standard (RFC 9309). Reputable crawlers follow it; scrapers that fake a browser user-agent do not. If you need hard blocking, do it at the firewall or CDN level by verified bot identity, not in this file.

Frequently asked questions

Can robots.txt remove a page from Google?

No. robots.txt controls crawling, not indexing. A blocked URL can still be indexed, without a snippet, if other pages link to it. To keep a page out of search results, let Google crawl it and return a noindex robots meta tag or an X-Robots-Tag: noindex header.

Does blocking Google-Extended remove my site from AI Overviews?

No. Google-Extended only controls whether content crawled by Google may be used to train and ground Gemini models. AI Overviews are part of Google Search and follow Googlebot rules. To limit what Search shows, use nosnippet or max-snippet, which also affect regular snippets.

Does Google support Crawl-delay?

No. Googlebot ignores the Crawl-delay line, and the crawl rate setting in Search Console was retired in January 2024. Bing does respect Crawl-delay. If Googlebot overloads your server, temporarily returning 503 or 429 status codes makes it slow down.

How long does Google take to see a new robots.txt?

Google generally caches robots.txt for up to 24 hours. You can ask for a recrawl of the file from the robots.txt report in Search Console, under Settings, which also shows the last fetched version and any parsing errors.

Related tools: Meta Tag Generator · Hreflang Generator · SERP Snippet Preview