llms.txt vs robots.txt: what they do for AI agents
Compare llms.txt guidance with robots.txt crawler preferences. See examples and understand where APIs, MCP, and server permissions fit.
Dev Shah5 min read
Robots.txt expresses instructions for cooperating crawlers. Llms.txt proposes a readable guide to useful website content. Neither grants account access or enforces private-resource permissions. Use documented crawler preferences for public discovery, clear documentation for supported tasks, and server authorization for customer data and writes.
This guide compares the files, supplies editable examples, and explains where APIs, MCP, verified request identity, and Marshy browser-session classification fit.
A quick map of the mechanisms
| Mechanism | Main role | What still needs another control? |
|---|---|---|
robots.txt |
Instructions for cooperating crawlers | Enforced access to private resources |
llms.txt |
Guidance and links for agents | Authentication and authorization |
| API or MCP tools | A structured way to perform supported tasks | Resource permissions and business rules |
| Signed bot requests | Evidence about the request's signer | Customer approval and operation scope |
| Session classification | Evidence about browser automation | Provider verification and account authority |
Combining these mechanisms can make a product easier to use and govern. Treating one as a substitute for the others creates gaps.
Robots.txt expresses crawler preferences
The Robots Exclusion Protocol, RFC 9309, explicitly separates its rules from access authorization. It defines instructions crawlers are requested to honor.
A disallowed path is still reachable unless your application or edge enforces a restriction. It can also be exposed by being listed in a public robots.txt file. Protect private account data with authentication and permissions rather than a crawl directive.
For public content, choose policies based on the service's actual purpose. OpenAI's crawler documentation separates search, training, and user-triggered retrieval. You can express different choices for search crawling and training crawling.
For example, a site owner who wants to permit OpenAI search crawling while declining GPTBot crawling could use:
User-agent: OAI-SearchBot
Allow: /
User-agent: GPTBot
Disallow: /
This is a crawler-preference example, not an enforcement mechanism. Review the whole file and your edge rules before applying it. A provider's user-triggered browser or retrieval path may follow different rules, and other providers need their own documented policy.
Anthropic also publishes crawler-specific guidance. Do not assume one vendor's user-agent names or behavior apply to another.
Llms.txt helps explain your site
The llms.txt proposal describes an agent-friendly Markdown file with guidance and links to more detailed content. It can help you point an assistant toward current documentation and the interface you want it to use.
For a SaaS product, useful entries might describe supported API tasks, authentication documentation, limits, and where to find human support. Keep those links accurate and avoid including credentials or private endpoints' contents.
Its presence does not ensure an agent reads it or follows it. It is also not a security boundary or a promise of search visibility.
Google's guidance for AI features in Search says special AI text files and markup are not required for inclusion. Focus on useful, crawlable content and consistent information; evaluate llms.txt as a documentation convenience rather than a guaranteed ranking technique.
What does an llms.txt file look like?
The proposal uses a Markdown overview and links to useful pages. A product site's example could look like this:
# Example Product
> Tools for managing a customer's own workspace.
## Product information
- [Plans](https://example.com/pricing): Current features and limits.
- [Help](https://example.com/help): Supported tasks and troubleshooting.
## Integrations
- [API documentation](https://example.com/docs/api): Authentication, scopes, and errors.
- [Agent access policy](https://example.com/agent-policy): Supported operations and limits.
This is an illustrative file, not an actual Marshy integration configuration. Replace the links with current public pages. Keep credentials and private account content out of the file, and ensure the linked pages contain the facts the assistant needs.
Will llms.txt improve my rankings?
Its proposed purpose is documentation guidance. Do not treat the file as an indexing request, an authentication mechanism, or a guaranteed SEO improvement. Google's current generative-AI optimization guide continues to prioritize useful content and foundational SEO rather than an AI text-file requirement.
MCP is a tool interface with a separate permission model
MCP can expose supported operations in a structured form. It is appropriate when a customer task would otherwise require a fragile sequence of browser steps.
The HTTP authorization specification defines how clients obtain and use access tokens for protected servers. Its transport-level support does not remove your application's need to check the target resource and requested operation.
For example, a read_report tool and a delete_report tool should not receive identical treatment simply because the client can connect. Define narrow capabilities, match grants to the intended task, and preserve ownership and workflow checks.
An existing API may already be the right interface. Choose MCP when it improves the supported integration rather than using its presence as a measure of agent readiness.
Request signatures support identity verification
Cloudflare's Web Bot Auth implementation uses HTTP message signatures and key directories to verify automated requests. Its documentation identifies the underlying work as IETF drafts, so implementations and interoperability details require attention.
Verification involves validating the signature and trust context, not just noticing a header. A signed request can establish something about its signer without proving that a customer approved every business operation it requests.
Use verified operator identity as one input to policy. Keep account authority, operation scope, and any required confirmation separate.
Where browser detection belongs
Some agents operate a browser without presenting an independently verifiable provider identity. Session classification can still help you investigate that activity. Use an advisory result alongside your account and backend records.
The guides to Meta Muse, Grok Bot, and Claude Code explain those investigation paths. Marshy AI agent detection helps you observe automated browser sessions alongside your other controls. The technical overview explains the detection technology that powers Marshy.
Put the controls together around a task
Make public help content discoverable, state crawler preferences, and document the structured interface you support. Require appropriate credentials for private work. Validate the requested resource and operation at the server. Observe automated browser journeys and record whether useful tasks complete.
That combination gives an authorized agent a workable path while preserving your product's boundaries. Use the agent-readiness checklist to test it and the agent-policy guide to decide which actions to support.
Primary documentation checked October 8, 2026. Configuration examples and interface choices are editorial recommendations, not guarantees of indexing or provider compliance.