How do I control AI crawler access through robots.txt?
Your site's robots.txt file is where you manage this: write rules that name a crawler by user-agent, then list the paths that crawler is permitted or forbidden to fetch.
You might, for instance, open your public pages to one AI crawler, keep it out of a single directory, or shut it out of the whole site. What matters is using each crawler's documented user-agent instead of lumping every AI bot into one group.
When AI visibility is a goal for the site, granting access selectively usually works better than shutting out every AI crawler.
Few technical controls are as simple for a site owner as robots.txt, and few are misunderstood as often.
The file tells compliant crawlers which parts of a site are open to them and which are not.
Sites that care about AI take this more seriously every year, since each AI company runs its own crawlers, and those crawlers do different jobs.
Allowing everything by default is not the aim, and neither is blocking everything. What you want is for legitimate crawlers to have suitable access to the content you actually intend people to find.
Think of robots.txt as a policy for crawler access, not a single switch that turns "AI" on or off.
Which setup is correct comes down to three things: the crawler in question, the job it performs, and the sections of your site you want it to reach.
What is robots.txt actually in charge of?
A robots.txt file usually lives at the root of the website, for example:
https://example.com/robots.txt
Inside are rules telling compliant crawlers which paths or URLs they may request and which they may not.
A basic rule names a crawler, then gives that crawler an access instruction.
User-agent
Names the crawler that the rules beneath it are meant for.
Allow
Signals that the given path is open for crawling, provided the crawler supports this directive.
Disallow
Instructs a compliant crawler to stay out of the given path.
How do I grant AI crawler access to my site?
The usual approach: name the crawler by its documented user-agent, then allow the path you want it to reach.
User-agent: ExampleBot Allow: /
That rule lets the named crawler know the root path of the site is open to it.
The user-agent has to match the identity the crawler documents, exactly. So before you add a rule, look it up in the AI company's own documentation.
How do I manage one particular AI crawler?
A live rule has the same shape, except the user-agent is the documented name of whichever crawler you mean to manage.
OpenAI, for instance, documents OAI-SearchBot as its crawler for finding websites that may be surfaced in ChatGPT search results.
User-agent: OAI-SearchBot Allow: /
When visibility in AI search is what you are after, a rule of this kind can fit well, since it openly grants the crawler permission to read the site's content.
Syntax by itself is not the main thing here. What counts is how the crawler, the content and your business goal relate to one another.
How do I shut an AI crawler out of the whole site?
When there is a legitimate reason to keep one compliant crawler away from the site, disallowing the root path does it.
User-agent: ExampleBot Disallow: /
That tells the named crawler to stay out of every path on the site.
Keep in mind how sweeping this rule is.
Suppose the crawler powers AI search or retrieval, and you want your content found there. A block across the full site then undercuts that very goal.
Wanting to stop one unwelcome bot is not a reason to apply an AI crawler block across the whole site.
Pin down the exact crawler, then limit only the things that truly need limiting.
Can I keep an AI crawler out of just one section?
Yes.
That is frequently the better choice for a site that mixes valuable public information with areas no crawler should enter.
User-agent: ExampleBot Disallow: /private/ Disallow: /internal/ Disallow: /staging/
Here the crawler keeps its access to most of the website. Only certain directories are placed off limits.
A publisher can keep a helpful public structure in place this way, with chosen areas held outside what the crawler is meant to reach.
Which pages should AI crawlers be able to reach?
On a site built around AEO, the best candidates tend to be pages you are deliberately trying to get discovered.
| Content | Typical approach | Reason |
|---|---|---|
| FAQs | Allow | They answer questions head-on, which can make them valuable sources for retrieval. |
| Expert articles | Allow | Helpful explainers build topical authority and supply material that answers can draw on. |
| Service pages | Usually allow | They describe what the company does and can matter for queries with commercial intent. |
| Customer portal | Restrict | Customers' private details must not be exposed to public crawlers. |
| Internal systems | Restrict | Internal material was never meant to serve as a public source for discovery. |
| Staging environment | Restrict | Staging and development content should generally not count as public information. |
Can each AI crawler get its own rules?
Yes.
It is among the biggest benefits that specific user-agent groups offer.
You do not have to label every automated system "AI." Each documented crawler can have a separate set of rules.
Name the crawler
Find the crawler's official user-agent name, and learn what it is for.
Set the business goal
Choose among three outcomes for the crawler: finding your public content, reaching only chosen areas, or staying blocked.
Write the tightest rule that works
Open up valuable public paths, and limit only areas where a restriction is truly required.
Check the outcome
Make sure the robots.txt file can be reached, and that the crawler you had in mind can get to the content you had in mind.
What does User-agent: * mean?
The asterisk works as a wildcard. It commonly stands for any crawler without a more specific user-agent rule matching it.
User-agent: * Disallow: /private/
That is not the same thing as naming an AI crawler outright.
Before using a sweeping wildcard rule, learn how it interacts with more specific crawler groups, and how each crawler interprets robots.txt.
Where controls over AI visibility matter, knowing the particular crawler you want to manage generally beats leaning on assumptions about what the wildcard does.
Which robots.txt error hurts AEO most?
High on the list: blocking, without meaning to, the very content you are working to get discovered.
A sweeping rule like this one is a typical cause:
User-agent: * Disallow: /
In effect, every compliant crawler the rule covers is told to keep away from all paths on the site.
When a site's strategy rests on discovery through search and AI, that is a serious technical error.
Make a robots.txt review a standing part of every AI visibility audit.
However well an FAQ is written, it is no use as a retrieval source to a crawler that has been told to stay away from it.
Will robots.txt keep private information safe?
No.
Getting this difference right is essential.
All robots.txt does is give instructions to crawlers that choose to comply. Do not treat it as an authentication mechanism, or as a dependable way of keeping sensitive material secret.
Information that truly has to stay private needs proper technical access controls, such as authentication and authorization.
robots.txt
Tells compliant automated agents what your crawler-access preferences are.
Login
Decides whether a user or system must be authenticated before protected content is served.
WAF
Able to filter and control real network requests, regardless of what robots.txt says.
Can a CDN or WAF undo my robots.txt plan?
Permitting a crawler in robots.txt is no guarantee that it will retrieve the page successfully.
Several other technical layers shape access too. Firewalls, CDNs (content delivery networks), systems for managing bots, limits on request rates, authentication and challenge mechanisms all play a part.
So a robots.txt file can look correct while a legitimate crawler, on trying to fetch the page, still gets an automated challenge or an HTTP error.
robots.txt
Sets out the crawler instructions that the website publishes.
DNS / CDN
Passes requests through the infrastructure that serves the site.
WAF / security
Can allow, challenge, rate-limit or block requests on its own terms.
Origin server
Has the final say on whether the requested resource is returned successfully.
If I want to show up in ChatGPT, should OAI-SearchBot be allowed?
Yes, generally. When you want your public content to be discoverable in ChatGPT search, and possibly cited there, letting the relevant crawler in is the fitting choice.
According to OpenAI, OAI-SearchBot is the crawler that searches websites for inclusion in ChatGPT search results, and OpenAI gives publishers guidance on letting it reach public content.
Wanting visibility in AI search is one goal. Wanting to limit other kinds of AI-related access is another. Never assume the two are automatically the same.
And Google-Extended?
Google documents Google-Extended as a separate robots.txt product token. It governs certain uses of crawled content in connection with Gemini.
According to Google, Google-Extended has no effect on whether a site is included in Google Search, or on how it ranks there.
It shows well why no single robots.txt rule should be assumed to stand for a universal "AI crawler" decision.
| Control | Purpose | AEO consideration |
|---|---|---|
| OAI-SearchBot | Crawling for OpenAI search | Matters when the aim is public content that ChatGPT search can discover. |
| Googlebot | Crawling for Google Search | A broad block here can affect how Google Search crawls and discovers your pages. |
| Google-Extended | Certain controls over Gemini-related training and grounding | A control that stands apart from everyday Google Search crawling. |
How can I confirm my robots.txt rules do what I intend?
Load the file yourself
Go to the /robots.txt URL on your domain and check that anyone can reach the file.
Verify the user-agent
The crawler name written in the rule has to match the documented user-agent.
Go over the paths involved
Check that no disallow rule has swept up important public pages by accident.
Look at server logs
Where you have them, server logs help show whether legitimate crawlers reach the site, and which responses come back to them.
Inspect the security layers
Verify that the same crawler is not being blocked separately by your WAF, CDN or bot-management systems.
Which robots.txt strategy works best for AEO?
In most cases the answer is selective accessibility.
Let legitimate discovery systems reach the content you want found, and restrict resources that are private, sensitive, in staging or otherwise unsuitable.
- Leave valuable public FAQs open.
- Leave authoritative articles open.
- Leave key product and service information open.
- Name each AI crawler individually. Do not treat all automated traffic as a single category.
- Steer clear of broad AI crawler blocks covering the whole site, unless a specific reason calls for one.
- Put suitable restrictions on sensitive and private areas.
- Look at CDN and WAF rules as well as robots.txt.
- Recheck robots.txt every time the site goes through a major SEO or technical change.
- Return to your crawler policies as AI search platforms, and the crawler policies they document, change.
Which robots.txt errors should I steer clear of?
Blocking everything
Disallowing the whole site can keep legitimate discovery systems away from content you want people to find.
Naming the wrong bot
A rule does its job only if it targets the user-agent of the crawler you really mean to manage.
Using robots.txt as a security tool
A robots.txt restriction is not enough for sensitive information, which needs real access controls.
What should I review before editing robots.txt?
- Which crawler do I want to manage?
- What purpose does that crawler document?
- Would I like that system to discover my public content?
- Which exact URLs or directories call for restrictions?
- Might the rule catch valuable public content by accident?
- Have I mistaken a legitimate crawler for an unwelcome scraper?
- Is my CDN or WAF perhaps blocking the crawler already?
- Am I counting on robots.txt where the information really calls for authorization or authentication?
- Did I test the robots.txt file that resulted?
Bottom line
Managing AI crawler access in robots.txt means writing rules for particular crawler user-agents and stating which paths each one can and cannot crawl.
On a site focused on AEO, the general aim is to keep valuable public content open to legitimate AI retrieval and discovery systems, and to restrict areas that are private, sensitive, in staging or otherwise unwanted.
Do not lump every AI crawler into a single category. Crawlers serve different purposes, so a rule that suits one of them can be wrong for the next.
Above all, keep in mind that robots.txt instructs crawlers about access and does not secure anything. Information that truly must stay private needs suitable technical access controls.
The best robots.txt setup for AEO is neither the most permissive nor the most restrictive. It is the setup that lets the correct crawlers in to reach the correct content.