You need to decide whether AI crawlers should access your content, but a blanket allow-or-block choice is usually too crude. Your public articles, customer accounts, internal search pages, licensed material, and staging environment do not carry the same value or risk.
The useful approach is to turn that mixed estate into an explicit access policy, publish the parts that compliant crawlers can follow, and enforce genuinely sensitive boundaries outside robots.txt. That gives you a policy your SEO, content, security, and legal teams can inspect instead of a collection of unexplained bot rules.
Start with the access decision, not the file
Do not begin by copying a block of robots.txt directives. Begin by deciding what outcome you want for each class of content. A technically valid rule can still be strategically wrong if it hides the pages you want cited or exposes URLs that should have been protected by authentication.
Classify your content into three practical groups:
- Content you want discovered: public articles, documentation, product explanations, support answers, original research, and other pages that help people understand or evaluate your organization.
- Content that can remain public but is not useful to crawl: faceted navigation, internal search results, duplicate print views, session-dependent URLs, utility endpoints, and repetitive archives.
- Content that must be protected: customer records, private workspaces, unpublished material, confidential files, administrative interfaces, and non-public environments.
The third group is the easiest decision: protect it with authentication and application or network controls. A robots.txt rule is public, voluntary, and visible to anyone. It can tell a compliant bot not to request a path, but it does not make that path private. Never put a sensitive URL into robots.txt as if the entry were an access-control list; the entry can reveal the very path you hoped to conceal.
The first two groups require a business decision. If AI discovery matters to you, allowing useful public pages creates the opportunity for compliant crawlers to retrieve them. Blocking those pages removes that route. Allowing access does not guarantee inclusion, citation, ranking, or favorable representation, just as blocking future crawling does not guarantee that every existing copy or prior reference will disappear.
Write the decision down as a sentence before translating it into syntax. For example: “Allow verified AI search crawlers to access public editorial and documentation pages, but exclude internal search, account, checkout, and staging URLs.” That sentence becomes the standard against which every rule can be tested.
Use robots.txt for crawler policy and security controls for enforcement

For compliant bots, robots.txt is the primary place to publish path-level crawling instructions. By contrast, llms.txt is optional guidance that AI search bots may never read. The two files therefore solve different problems: robots.txt communicates access preferences, while llms.txt can provide a curated map of useful material.
Neither file is a security boundary. If access must be prevented rather than merely discouraged, enforce the decision with the control appropriate to the risk:
- Private content: require authentication and authorization. An unlinked URL is not private.
- Staging and preview environments: put the entire host behind authentication or an allowlist. A robots.txt block alone leaves the pages reachable.
- Abusive automated traffic: use rate limits, bot-management rules, or firewall controls. Robots.txt cannot stop a client that ignores it.
- Paid or licensed material: align crawler access with your contracts and rights policy before publishing rules. A technical setting cannot resolve a rights question.
- Public content you want discoverable: keep the relevant paths crawlable, then improve the content and its internal linking. Access is only the first condition for visibility.
Keep llms.txt in the optional layer. If you choose to publish it, point to canonical, high-value public resources such as core documentation, an organization overview, major topic hubs, and important policy pages. Do not put secrets, private endpoints, temporary URLs, or instructions that conflict with robots.txt in it. Treat the file as a low-cost orientation aid, not evidence that any particular AI system has consumed or obeyed it.
Write rules that match real paths, hosts, and crawler identities
Audit the robots.txt file already in production before adding anything. It may contain rules needed by conventional search crawlers, image crawlers, shopping services, site-audit tools, or legacy systems. Replacing the whole file to add one AI crawler can create a much larger indexing problem.
Build an access matrix before editing. This keeps the decision legible:
| Content or system | Default decision | Control to use |
|---|---|---|
| Public articles and documentation | Allow when AI discovery supports your goals | Robots.txt plus crawlable internal links |
| Duplicate and low-value utility URLs | Usually exclude from crawling | Path rules, then fix URL generation where practical |
| Accounts, private files, and administration | Deny public access | Authentication and authorization |
| Staging, previews, and test hosts | Deny public access | Host-level authentication or network allowlisting |
| High-volume automated requests | Limit according to operational risk | Rate limiting or bot management |
| Curated AI orientation file | Optional | llms.txt containing public canonical URLs only |
Then inspect server or CDN logs to learn which automated clients are actually requesting your pages. Record the presented user-agent, requested paths, response codes, request volume, and host. A user-agent string is a claim, not proof of identity, so confirm a crawler against its operator’s current official verification instructions before granting it an exception or relying on identity-based firewall rules.
A complete block for one named crawler has a simple shape. Replace the placeholder with the exact published user-agent token:
User-agent: AI-CRAWLER-NAMEDisallow: /
A path-specific policy can keep public content available while excluding sections that offer little discovery value:
User-agent: AI-CRAWLER-NAMEDisallow: /account/Disallow: /checkout/Disallow: /internal-search/
An empty disallow value communicates that the crawler is not being excluded by that group:
User-agent: AI-CRAWLER-NAMEDisallow:
These fragments are patterns, not a replacement file. Merge the intended group into your existing configuration and check whether a broader wildcard group also affects the same client. Keep comments beside unusual decisions so the next person knows who approved the rule, what paths it covers, and why it exists.
Apply the policy to every relevant hostname. The robots.txt file on your main website does not describe a separate documentation host, store, support portal, regional domain, asset host, or staging subdomain. Inventory those hosts explicitly. A common failure is to secure the main site carefully while leaving a preview or documentation host outside the review.
Use path boundaries deliberately. A directive aimed at /account/ should be checked against the actual URL patterns generated by your application. Look for alternate language paths, trailing-slash variants, query-driven versions, old routes, and files served from a different hostname. If the same material can be reached through another public route, blocking one path does not complete the policy.
Verify behavior in logs after deployment

A robots.txt change is not finished when the file is uploaded. It is finished when the live file contains the intended rules, important pages remain reachable, protected resources are protected independently, and observed crawler behavior matches the decision.
- Save the previous version. Keep a dated copy or version-control record so you can identify the exact change and restore it if necessary.
- Check the live URL. Request
/robots.txton every affected host. Confirm that the response is the current plain-text file, not an old CDN copy, redirect surprise, application error, or branded HTML error page. - Review every user-agent group. Look for a wildcard rule that could affect more crawlers than intended and for a specific group that could change how a named crawler interprets the policy.
- Test representative paths. Use at least one URL that should be crawlable and one from each blocked section. Test the real production paths, not simplified examples.
- Confirm security separately. Try to reach private and staging resources without credentials. If they are accessible, fix the access layer even when robots.txt says
Disallow. - Watch request logs. Compare crawler requests before and after the change. Check whether blocked paths stop receiving requests from compliant clients and whether unexpected clients or path variants continue to appear.
- Review visibility consequences. If important public pages lose discovery or referral activity after a restrictive change, inspect the crawler policy alongside ordinary SEO causes. Do not assume the timing proves a single cause.
Monitoring also exposes a distinction that configuration reviews miss: a crawler can obey the right rule while another client presents a different identity, fetches a different hostname, or reaches the same material through another URL. Logs turn a theoretical policy into observable traffic.
Assign an owner and a review trigger. Revisit the policy when you launch a new host, move content behind or out of a paywall, change CDN or firewall tooling, add a major content section, or receive new contractual requirements. Also review unexplained rules rather than preserving them indefinitely. A stale block can quietly undermine an AI visibility strategy long after the reason for it has disappeared.
Key takeaways
- Decide access by content class and business outcome before writing crawler directives.
- Use robots.txt to communicate with compliant crawlers; use authentication, authorization, rate limits, and network controls when access must actually be enforced.
- Do not treat llms.txt as a replacement for robots.txt. It is an optional map, and AI bots may not read it.
- Verify crawler identities and actual request paths from logs instead of relying on a user-agent label alone.
- Apply and test the policy on every relevant host, including documentation, commerce, regional, asset, preview, and staging systems.
- Allowing crawling creates an opportunity for AI discovery, not a guarantee of citation or ranking; blocking future crawling is not a guaranteed deletion mechanism.
Your next useful move is small: inventory your public hosts, classify five representative URL types, and compare that decision with the robots.txt files currently served. Any mismatch gives you a concrete rule, security control, or ownership question to fix.
References




























