Robots.txt: The Boring File Worth Getting Right

Robots.txt decides which bots can crawl your site, including AI search and training bots. Why it matters, what your host may be overriding, and a quick check.

A sample robots.txt file blocking GPTBot and allowing OAI-SearchBot, beside a five-point checklist from file loading to what your host is blocking

Robots.txt is a small text file at the root of your site that tells bots which parts they may crawl. It's one of the least exciting files on a website, and one of the easiest to get expensively wrong.

One stray line can hide a whole site from Google. Several sites I've reviewed recently had settings that either let in far more than intended or quietly shut out bots the owner wanted in. In some cases the robots.txt file looked fine, but something else on the server was overriding it. A ten-minute check is worth doing.

Who You're Letting In: AI Search, Training and Agents

Robots.txt used to be mostly about search engines. Now there are three kinds of AI bot to think about, and the choice for each is a business decision, not a technical one.

  • AI search bots fetch pages so AI tools can cite and link to you, for example OAI-SearchBot from OpenAI. Block these and you can drop out of AI answers.
  • AI training bots collect content to train models, for example GPTBot from OpenAI, ClaudeBot from Anthropic and Google-Extended from Google. Blocking Google-Extended doesn't affect your Google Search rankings.
  • AI agents visit pages on behalf of a person, such as booking or comparing products. Many of these act like a browser and don't read robots.txt at all.

Most small business sites want to be found, so allowing AI search bots is usually sensible. Whether to allow training is a call for the owner. Either way, make it on purpose rather than by default.

Your Host May Be Overruling Your File

Robots.txt is only a request. Your host, CDN or security service can block bots before they ever read it, and you may not know that setting is on.

Cloudflare, which sits in front of a large share of sites, is the common example. It offers a one-click "Block AI bots" setting and a managed robots.txt that adds AI-blocking rules to the top of your own file. From 15 September 2026, new domains on Cloudflare block AI training and agent bots by default on pages that show ads (Cloudflare changelog).

I've seen this play out:

  • AI blocked without anyone deciding. One site's robots.txt allowed every bot, yet AI crawlers were being blocked. The block was coming from a Cloudflare setting nobody had chosen deliberately.
  • A crawl trap. Another site allowed all bots correctly, but its events calendar generated endless month pages (I found March 2040). Bots could keep crawling them forever, wasting crawl time that should go to real pages.

WordPress plugins, security firewalls and host-level settings can do the same thing. If you don't control the hosting account, ask whoever does.

A Ten-Minute Check

Type yourdomain.com/robots.txt into a browser and work through this list.

  • Does the file load? You should see plain text, not an error page. If the file returns a server error, Google can pause crawling your whole site.
  • Look for Disallow: / under User-agent: *. That one line blocks the entire site. It's often left behind after a site goes live from a staging copy.
  • Check what's blocked. Admin areas, internal search results (/?s=) and endless calendar or filter pages are fine to block. Your products, services, blog or images are not.
  • Find the AI bots by name. Note which of GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot (from Perplexity) and Google-Extended are allowed or blocked, and whether that matches what you want.
  • Check for a Sitemap line. It should point to your current sitemap URL, and that URL should load.
  • Look for text you didn't write. A block marked as Cloudflare managed content means your CDN is adding rules.
  • Check the host and CDN settings. In Cloudflare, look at the AI bot and AI Crawl Control settings. Elsewhere, ask your web host or developer whether bots are blocked at server or firewall level.
  • Confirm in Google Search Console. The robots.txt report in Search Console shows what Google last fetched and any errors, and URL Inspection shows whether a key page is blocked.

If anything doesn't match what you'd expect, it's usually a quick fix. The hard part is noticing. For more technical checks, see my static site SEO checklist.

If you'd like me to take a quick look at your robots.txt and hosting settings, let's talk.