Back to the homepage
Technical SEO

Robots.txt for AI Crawlers: A Setup Guide for SaaS Sites

Search crawlers and training crawlers now use different tokens. Here is how to allow AI search citations without handing over training data you would rather keep.

Grant Whitaker · Technical SEO Writer
Start reading ↓
Desk
Technical SEO
Format
How-to
Reading time
7 min
Published
Oct 19, 2026

A SaaS robots.txt file for AI crawlers should separate search from training. Allow the crawlers that put your pages in AI search answers, such as Googlebot and OAI-SearchBot. Then decide separately whether to block training tokens like GPTBot and Google-Extended. Blocking Google-Extended doesn't remove you from Google Search, and that one detail trips up many teams.

Robots.txt used to be a set-and-forget file. A developer wrote it at launch, blocked the staging paths and nobody touched it again. AI crawlers changed that, because each vendor now ships several user agents with different jobs.

This guide is for SaaS marketers and founders who own their site's technical SEO, or who need to brief the engineer who does. It covers how robots.txt rules are actually parsed, which AI tokens do what and a sample file you can adapt. Cekpr covers technical SEO and AI search for B2B software teams, and robots.txt is the most common AI visibility mistake we find in audits.

How do crawlers read a robots.txt file?

Crawlers follow the Robots Exclusion Protocol, published by the Internet Engineering Task Force (IETF) as RFC 9309 in September 2022. A crawler finds the group that matches its user agent, case-insensitively. It then applies the most specific matching rule, meaning the longest path match, to decide whether a URL is allowed.

Three details in RFC 9309 matter for SaaS sites. First, crawlers must parse at least 500 kibibytes of the file, so a bloated file can get cut off. Second, crawlers shouldn't use a cached copy for more than 24 hours, so changes take effect within about a day.

Third, error codes change behavior. A 4xx response lets crawlers treat the file as missing and crawl everything. A 5xx response means crawlers must assume a complete disallow, which is how a misconfigured CDN can quietly stop all crawling.

Rows of servers glowing in a dark server room

Search crawlers versus training crawlers

The key decision is which AI uses you want to allow. Some crawlers fetch pages so an AI search product can cite them. Others gather content to train future models. A SaaS company usually wants the first and may not want the second.

The table below maps the main tokens from Google and OpenAI to their purpose.

Search crawlers versus training crawlers
TokenVendorPurposeEffect of blocking
GooglebotGoogleSearch crawlingPages drop out of Search and AI Overviews
Google-ExtendedGoogleGemini training and groundingNo effect on Google Search
OAI-SearchBotOpenAIChatGPT searchRemoved from ChatGPT search answers
GPTBotOpenAIModel trainingSignals content shouldn't be used for training
ChatGPT-UserOpenAIUser-requested page fetchesRobots.txt may not apply

Other AI vendors publish their own tokens. Check each vendor's crawler documentation before adding a rule, since names and purposes change.

Keep a short internal note listing every AI token in your file and why it is allowed or blocked. When a vendor renames a crawler or adds a new one, that note tells the next person what the original decision was.

What does Google-Extended actually control?

Google-Extended controls whether content Google crawls can be used to train Gemini models and to ground Gemini answers. Google's documentation on common crawlers says it doesn't affect a site's inclusion in Google Search. It also has no separate HTTP user agent, so it never shows up in your logs.

That last point confuses people reviewing server logs. Google crawls with its existing user agents and applies the Google-Extended rule as a usage control afterward. You can't confirm the rule from log data alone.

The bigger risk runs the other way. Some teams block Googlebot on sections they consider "AI sensitive," thinking it only affects AI answers. Google's guidance on AI features and your website is clear that AI Overviews and AI Mode use normal Search eligibility. Block Googlebot, and those pages leave classic results too.

Software developer writing code at a computer with two monitors

How OpenAI's crawlers handle robots.txt

OpenAI's crawler documentation lists three agents, and each robots.txt setting works independently. OAI-SearchBot surfaces sites in ChatGPT search. GPTBot crawls content that may be used to train OpenAI's foundation models.

ChatGPT-User is different. It visits a page when a user asks ChatGPT a question that needs it, so robots.txt rules may not apply. OpenAI says to use OAI-SearchBot rules, not ChatGPT-User rules, to manage search appearance.

OpenAI says its search systems take about 24 hours to reflect a robots.txt change. It also publishes IP range files for each crawler. Your security team can use them to verify that a request claiming to be OAI-SearchBot really is.

A sample robots.txt for a SaaS site

The file below allows search crawlers, blocks training crawlers and keeps private app paths out of every index. Adjust the paths to match your own app and docs structure.

text
User-agent: *
Disallow: /app/
Disallow: /api/
Disallow: /checkout/
User-agent: GPTBot
Disallow: /
User-agent: Google-Extended
Disallow: /
Sitemap: https://www.example.com/sitemap.xml

This file doesn't need an explicit group for Googlebot or OAI-SearchBot. Both fall back to the wildcard group, which allows everything except the private paths. Adding a named group for a crawler would replace the wildcard rules for that crawler, so repeat the private paths if you ever add one.

Old lock and latch on a weathered blue wooden door

Whether to block training is a business decision, not a technical one. The U.S. Copyright Office's report on copyright and artificial intelligence covers generative AI training in Part 3, released in pre-publication form on May 9, 2025. Some SaaS companies block training to protect proprietary content. Others allow it so models learn their product names and category.

How to test and roll out robots.txt changes

Robots.txt mistakes are expensive and easy to make. The steps below catch most of them before they reach production.

  1. Diff the change. Keep robots.txt in version control and review every edit like code.
  2. Test key URLs. Check your homepage, pricing page, top blog posts and docs against the new rules with a robots.txt testing tool.
  3. Check the response code. Confirm the file returns 200, not a redirect chain or a 5xx from the CDN.
  4. Deploy and wait a day. Most crawlers refresh their cached copy within 24 hours.
  5. Verify in logs. Confirm blocked agents stopped requesting disallowed paths and allowed agents kept crawling.

Step three catches the failure nobody expects. A firewall rule that returns 503 to unknown bots can hit robots.txt itself. Under RFC 9309, a crawler that gets a 5xx has to treat your whole site as disallowed.

Illustration of a glowing digital network of connected points

Common robots.txt mistakes on SaaS sites

Most robots.txt problems on SaaS sites come from a short list of habits. None of them look dangerous in a pull request. The list below covers the ones Cekpr's editors flag most often in technical reviews.

  • Copying a blocklist from a forum. Long lists of AI user agents often include search crawlers by mistake, which removes the site from AI search answers.
  • Blocking the docs subdomain. Developer docs often sit on a separate host with its own robots.txt. That file gets forgotten while the main site gets updated.
  • Using robots.txt to hide pages from search. A disallow stops crawling, not indexing. A blocked URL can still appear in results if other sites link to it. Use a noindex tag on a crawlable page instead.
  • Leaving a staging rule in production. A blanket disallow copied from staging is the classic launch-day error, and it still happens.
  • Forgetting the sitemap line. It costs one line and helps every crawler find new pages faster.

The noindex point deserves emphasis. Teams sometimes disallow a gated content page to keep it out of AI answers. Because the crawler can't fetch the page, it never sees the noindex tag, and the URL can stay in the index anyway.

Subdomains need their own audit. Each host serves its own robots.txt, so www, docs, help and the app subdomain each need a separate check.

Where robots.txt fits in your AI visibility work

Crawl access is the floor, not the ceiling. Once the right crawlers can reach your pages, the content has to be worth citing.

Robots.txt is also where the documented controls live, which is why we argued in our explainer on whether a SaaS site needs llms.txt that it deserves attention first. After a rule change, track the effect with the routine in our guide to measuring AI search visibility in Search Console.

One caution on diagnosis. A traffic drop after a robots.txt edit might be a coincidence with something else, such as a Google update. Our backlink audit after the September 2026 spam update covers how to rule that out using rollout dates.

The robots.txt setup most SaaS sites need

Allow search crawlers, decide on training crawlers as a business choice and keep private app paths blocked for everyone. Never block Googlebot to manage AI answers, because it removes you from Search entirely.

Open your live robots.txt today and compare it with the sample above. If you find a blanket block on an AI search crawler you actually want, fix it, test it and check your logs tomorrow.

Does blocking Google-Extended remove my site from Google Search?
No. Google's crawler documentation says Google-Extended doesn't affect a site's inclusion in Google Search. It only controls whether crawled content is used to train Gemini models and to ground Gemini answers. To leave Google Search, you would have to block Googlebot, which also removes you from AI Overviews.
Should a SaaS company block GPTBot in robots.txt?
It depends on your goals. GPTBot gathers content that may train OpenAI's models, while OAI-SearchBot powers ChatGPT search. Blocking GPTBot doesn't affect ChatGPT search appearance, because each setting works independently. Block it if you want to protect proprietary content, or allow it if you want models to learn your brand.
How long does a robots.txt change take to work?
Usually about a day. RFC 9309 says crawlers shouldn't rely on a cached robots.txt for more than 24 hours, and OpenAI says its search systems take about 24 hours to reflect a change. Check your server logs the next day to confirm crawlers changed their behavior.
What happens if my robots.txt file returns a server error?
Crawlers must treat the whole site as disallowed. Under RFC 9309, a 5xx response on robots.txt means a complete disallow, so a firewall or CDN error can quietly stop all crawling. A 4xx response works the opposite way, letting crawlers treat the file as missing and crawl everything.

Written by

Grant Whitaker

Grant covers crawling, indexing and link audits for B2B software sites. He writes the step-by-step guides engineers and marketers can both follow.

More from Grant
Up next · Measurement How to Measure AI Search Visibility in Search Console in 2026
The Thursday letter · free

join the club.

The week's best SEO and AI search posts, plus one thing to check in your own Search Console, every Thursday morning. Unsubscribe whenever.