Skip to the content
Start free

What is robots.txt?

robots.txt is a plain text file at the root of a website, such as https://example.com/robots.txt, that tells crawlers, AI crawlers included, which addresses they may and may not fetch. It controls crawling, not indexing: Google says it is not a way to keep a page out of Google. It is also a request, not a lock. Polite crawlers obey it; others may not.

What is robots.txt? #

Since September 2022 it has been an internet standard: RFC 9309, the Robots Exclusion Protocol. A search crawler or an AI crawler reads it before it fetches other pages. Google says the main job is to manage crawler traffic, so your server is not overloaded, rather than to hide content.

Where does it live? #

The file must be called robots.txt, all lower case, at the top of the site. Google’s robots.txt rules say a file applies only to the same protocol, host and port. So https://shop.example.com needs its own file; the one on example.com does not cover it. Files in subfolders are not checked. The file must be UTF-8 plain text.

What does it look like? #

This is Google’s own example:

# This robots.txt file controls crawling of URLs under https://example.com.
User-agent: *
Disallow: /includes/

User-agent: Googlebot
Allow: /includes/

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

Every crawler may fetch everything except /includes/. Googlebot has its own group, which lets it in there too. The last line points to the XML sitemap. Lines that start with # are comments.

How do groups and rules work? #

A group is one or more User-agent lines followed by rules. The User-agent line names a crawler by its product token, such as GPTBot. RFC 9309 says that token should appear in the bot’s user agent string, and that matching is not case-sensitive. If two groups name the same crawler, their rules are combined. A crawler with no group of its own follows the * group. Paths, by contrast, are case-sensitive: /File.html and /file.html are different rules.

Which rule wins? #

The most specific rule wins: the one with the longest matching path. If an Allow and a Disallow are equally long, RFC 9309 says the Allow should be used, and Google uses the least restrictive rule. Two characters help: * matches any run of characters, and $ marks the end of the address. The robots.txt file itself is always allowed.

Rule Matches Does not match
Disallow: /private/ /private/notes.html /Private/notes.html
Disallow: /*.pdf$ /files/price-list.pdf /files/price-list.pdf?v=2
Disallow: /search /search, /search?q=spade, /searching /site-search
Disallow: / Every address on the host /robots.txt, which is always allowed

Which fields are supported? #

Google supports four fields: user-agent, allow, disallow and sitemap. It does not support crawl-delay. Other crawlers differ. Anthropic says it supports the non-standard Crawl-delay line. Apple says Applebot does not follow crawl-delay, and follows your Googlebot rules when the file does not mention Applebot. RFC 9309 itself defines only user-agent, allow and disallow; crawlers may read other lines, such as Sitemap.

What happens if the file fails? #

Server answer RFC 9309 Google
2xx (found) Rules apply Rules apply
3xx (redirect) Follow at least five redirects Follows at least five hops, then treats it as a 404
4xx (not there) May crawl anything As if there were no file, except 429
5xx (server error) Assume everything is disallowed Stops crawling for the first 12 hours while it keeps trying

So a server error on robots.txt can stop crawling of the whole site. A missing file does not.

How big, and how fresh? #

Google reads up to 500 KiB of the file and ignores anything after that. RFC 9309 says crawlers must parse at least 500 KiB. Google usually caches the file for up to 24 hours, and RFC 9309 says crawlers should not use a cached copy for longer than that unless the file cannot be reached. OpenAI says it can take about 24 hours for its search systems to adjust after you change the file.

One wrong line can stop search engines reading a whole site. A blocked page can still appear in Google, with no description, if other pages link to it: see indexed, though blocked by robots.txt. To keep a page out of the index, use noindex and leave the page unblocked, so the crawler can see the rule. Our page on noindex, nofollow or robots.txt explains which to use. On large sites, robots.txt also shapes your crawl budget.

Why does it matter for AI answers? #

Google’s guidance on AI features and your website says crawling must be allowed in robots.txt, and by any CDN or hosting set-up, and that robots.txt rules for Googlebot are the control for Search, AI Overviews and AI Mode included. To limit AI training and grounding in Google’s other systems, it points to Google-Extended. Other AI companies give each job its own name, so one file can allow AI search and refuse AI training.

Which AI names can I use? #

Name Company What it does
GPTBot OpenAI Crawls for training its models
OAI-SearchBot OpenAI Finds pages for ChatGPT search
ChatGPT-User OpenAI Fetches a page when a user asks; robots.txt may not apply
ClaudeBot Anthropic Collects content that may be used for training
Claude-SearchBot Anthropic Crawls to improve search results
Claude-User Anthropic Fetches pages when a Claude user asks
PerplexityBot Perplexity Surfaces and links sites in Perplexity search
Perplexity-User Perplexity Fetches for a user; generally ignores robots.txt
Google-Extended Google A token only, with no crawler of its own: covers use for training Gemini models
Applebot-Extended Apple A token only, with no crawler of its own: covers Apple model training

Sources: OpenAI, Anthropic, Perplexity, Google and Apple, checked 24 November 2026.

What about fetches a person asks for? #

A live fetcher visits a page because a person asked an AI a question. Google says its user-triggered fetchers generally ignore robots.txt for that reason. Perplexity says the same of Perplexity-User, and OpenAI says robots.txt may not apply to ChatGPT-User. A training crawler is the opposite case: it works on its own schedule, so robots.txt is the right control.

Is robots.txt a lock? #

No. RFC 9309 says its rules are not a form of access authorisation and do not replace real security. Google adds that not every crawler obeys it, and that crawlers read the syntax differently. The file is also public, so a Disallow line can point people to the folder you meant to hide. For real protection use a login, a web application firewall or rate limiting.

Common mistakes #

  • Disallow: / left over from a test site. It blocks every compliant crawler.
  • Blocking CSS and JavaScript. Google says not to block resources the page needs to be understood. See JavaScript SEO.
  • Blocking a page you want removed. Google cannot then see the noindex.
  • Wrong case. Disallow: /Admin/ does not block /admin/.
  • Forgetting subdomains. Each host needs its own file.
  • Blocking AI search by accident. Disallowing OAI-SearchBot or PerplexityBot keeps you out of those answers. Choose per bot, not with one * line.
  • Blocking by IP address only. Anthropic warns this can stop its bot reading robots.txt, so the opt-out may not hold.
  • A robots.txt that errors. A 5xx answer can stop crawling. Watch it like a page.

A worked example #

A shop wants search engines and AI search, wants to refuse AI training, and has a filter maze under /search:

User-agent: *
Disallow: /search
Disallow: /basket/

User-agent: GPTBot
User-agent: ClaudeBot
User-agent: Google-Extended
User-agent: Applebot-Extended
Disallow: /

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

Googlebot, OAI-SearchBot and PerplexityBot follow the * group. The four training names get one shared group that blocks everything. One catch: a crawler with its own group ignores the * group. If you later give Googlebot a group of its own, copy the /search and /basket/ lines into it. Read more in block AI crawlers.

How to check it #

  1. Read it. Open /robots.txt on your site and read every Disallow line. Then run the Robots.txt Checker to test any address against your rules.
  2. See which AI bots get in. The AI Bot Checker shows which of GPTBot, ClaudeBot, PerplexityBot and the rest your file lets in.
  3. Check the server answer. The HTTP Header Checker shows the status code for /robots.txt. You want 200, never 5xx. If it moves, follow it with the Redirect Checker; see redirect.
  4. Check the Sitemap line. Run the address through the XML Sitemap Checker. Make sure no page in the sitemap is disallowed.
  5. Check pages you want hidden. The Meta Tag Checker shows a page’s robots meta tag, and the header checker shows any X-Robots-Tag. Those pages must not be blocked in robots.txt.
  6. Use Search Console. In Google Search Console, the robots.txt report shows the files Google found for your top 20 hosts, when it last fetched them and any errors. Use “Request a recrawl” after an urgent fix. The report needs a Domain property.
  7. Check the edge. Google says crawling must also be allowed by your CDN. A bot rule there can block what robots.txt allows; see Cloudflare blocking Googlebot.
  8. Check who obeys. Look in your server logs for bots fetching disallowed paths. Test any that claim a famous name with Verify an AI Bot, because verified bots and fakes look alike by name.
  9. Score the whole set-up. The AI Readiness Checker looks at robots.txt alongside other AI signals. Compare Two Websites sets your rules against a rival’s.
  10. Manage it over time. The Bot rules manager writes robots.txt and firewall rules for each bot, and Rivals’ AI bot rules shows which AI bots rivals let in. Both are in URSY Pro, opening in stages.

What URSY.com counts #

We count every request, robots.txt included, from the edge log and from the website, and sort each one by its user agent into people, search engines, AI crawlers, AI agents and other machines (API/MCP calls included). We mark each AI and search bot real, fake or unknown against the IP lists the companies publish. That lets you see which bots read your rules and which then fetched pages they were asked to skip. Every rule is on our methodology page; Crawl budget by bot in URSY Pro (opening in stages) shows where each bot spends its visits.

Questions #

Does robots.txt stop a page appearing in Google? #

No. It stops crawling. A blocked address can still be listed, without a description, if other sites link to it. Use noindex on an unblocked page instead.

Do AI companies obey robots.txt? #

Their own crawler pages describe robots.txt as the way to control their automatic crawlers. Fetches a person asks for are different: Google, Perplexity and OpenAI say robots.txt may not apply to them.

Yes, with care. Block training names such as GPTBot, ClaudeBot, Google-Extended and Applebot-Extended, and leave search names such as Googlebot, OAI-SearchBot and PerplexityBot allowed.

How fast do changes take effect? #

Google usually caches the file for up to 24 hours. OpenAI says about 24 hours for its search systems.

Does Google support Crawl-delay? #

No. Google supports user-agent, allow, disallow and sitemap only.

Sources #

Updated 24 November 2026 by URSY.com.

Cite this page: What is robots.txt?. URSY. Updated 26 November 2026. https://ursy.com/wiki/robots-txt/ · Section links

Tools for this

  • LiveAI Bot Checkerwhich AI bots your robots.txt lets inRun the check →
  • LiveRobots.txt Checker + Generatortest any address against your rules, or write new onesRun the check →
  • Livellms.txt Checker + Generatorcheck your llms.txt, or write llms.txt, llms-full.txt and llms.jsonRun the check →
  • LiveAI Consistency Checkerpage, schema, llms.txt and feeds state the same facts?Run the check →
  • LiveCan Google index this page? (noindex, robots, canonical, status)Run the check →
  • LiveHTTP Header Checker (cache, status, X-Robots-Tag)Run the check →
  • ProBot rules managerAllow / block each bot: robots.txt + firewall rules written for youIn URSY Pro →
  • Prollms.txt managerWrite, check and watch your llms.txtIn URSY Pro →
  • ProWhat AI readsAI reads of llms.txt, .md, .json, images, feedsIn URSY Pro →

All 871 wiki entries, A to Z →