robots.txt for small businesses: what to allow, what to block

Last updated

The short answer

Most small-business sites need a very short robots.txt: allow everything, keep crawlers out of pages with no value to a searcher (a basket, internal search results), and point to your sitemap. Never use it to hide a page from Google (use noindex for that), never block the CSS and JavaScript your pages need, and check that any AI rules block only what you meant to.

What robots.txt does, and what it doesn't

It is a plain text file at the root of your site, at https://yoursite.com/robots.txt, that tells crawlers which addresses they may fetch. Google reads it only from the top level of the site, and its rules apply only to the same host, protocol and port: shop.yoursite.com needs its own file.

What it does not do:

A safe starting file

For a typical brochure site or small shop, something like this is enough:

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

Sitemap: https://www.yoursite.com/sitemap.xml

Swap the two Disallow lines for your own basket and site-search addresses, or remove them; an empty file, or one with Disallow: and nothing after it, allows everything. The Sitemap line must be a full address, starting with https://.

How crawlers read the rules

These are the rules as Google documents them; the main AI crawlers say they honour the same standard.

Choosing what AI crawlers may do

AI companies name their crawlers by job, so you can allow the ones that let assistants find and cite you while opting out of training. This example lets the answer crawlers in and keeps two training crawlers out:

User-agent: OAI-SearchBot
User-agent: Claude-SearchBot
User-agent: PerplexityBot
Allow: /

User-agent: GPTBot
User-agent: ClaudeBot
Disallow: /

User-agent: *
Disallow: /cart/

Sitemap: https://www.yoursite.com/sitemap.xml

Two things to know. First, the answer crawlers' group above doesn't include Disallow: /cart/, so they may fetch the basket; add it to their group if that matters to you. Second, Google's training opt-out is a separate token, Google-Extended, and Google says it does not affect your inclusion or ranking in Google Search. Never block Googlebot to opt out of AI: that stops Google crawling your pages for Search.

Changes take time to reach the crawlers: OpenAI says about 24 hours for its search crawler.

Common mistakes

  1. Disallow: / left over from building the site. It blocks everything. Check the file whenever a site goes live or moves host.
  2. Blocking CSS, JavaScript or image folders. Google asks you not to block files your pages need to display, or it can't understand the page properly.
  3. Putting noindex in robots.txt. Google stopped supporting it on 1 September 2019. Use the meta tag or the X-Robots-Tag header instead.
  4. Blocking a page you also marked noindex. The crawler can't read the page, so it never sees the tag, and the address can stay in results.
  5. A named group that drops your general rules, as described above.
  6. A copied "block AI" list that includes OAI-SearchBot, Claude-SearchBot or PerplexityBot, which removes you from those assistants' answers.
  7. A broken sitemap line: a relative address, an old domain, or a sitemap that no longer loads.
  8. A robots.txt that is really an error page, or a server error that tells Google to stop crawling.

How to check yours

Run the free robots.txt checker: it reads your file, flags syntax mistakes, tells you whether it blocks your homepage or the files your pages need, shows what each major crawler is allowed, and checks that its sitemap lines load. For AI crawlers specifically, the AI crawler checker also tests whether your firewall lets them through. If assistants still can't see you, read why AI assistants can't see your website.

Checklist

What the free scan checks for this

These are the FocalScore checks that cover this guide's subject. Each one in your report says what it found, shows the evidence and gives the fix.

Sources

Last checked . Documentation, settings and rules change; if one of these pages now says something different, it is right and this guide is out of date. Tell us at info@focalscore.com.

  1. Google Search Central: Introduction to robots.txt
  2. Google Search Central: How Google interprets the robots.txt specification
  3. Google Search Central blog: A note on unsupported rules in robots.txt (2019)
  4. Google Search Central: Block search indexing with noindex
  5. OpenAI: Overview of OpenAI crawlers
  6. Anthropic: Does Anthropic crawl data from the web, and how can site owners block the crawler?
  7. Google Search Central: Google's common crawlers (Google-Extended)