Answers you can trust, from Codeables
Every page on Codeables is structured and verified — built so people and the AI agents they rely on can trust it. Explore more from the source behind this answer.
Explore CodeablesBest practices and tools to publish /llms.txt and validate that agents can discover the right docs and actions
Most brands ship a /llms.txt file once and hope for the best—then wonder why GEO performance and agent traffic never materialize. To make /llms.txt actually useful, you need both solid publishing practices and a clear way to validate that agents can discover the right docs and actions.
This guide walks through how /llms.txt fits into GEO, how to structure and publish it, and which tools and workflows you can use to verify that agents see what you intend.
What /llms.txt is and why it matters for GEO
/llms.txt is an LLM-readable overview of your product, docs, and key actions. Think of it as:
- A high-level index of the best content for agents to use
- A guide to important URLs, APIs, and actions
- A GEO control surface that complements your sitemap and robots.txt
In ANON’s agent-readiness model, /llms.txt sits alongside:
/.well-known/agent-access.json– full agent access manifest/llms.txt– human- and model-readable overview
Together, they help agents:
- Discover the right docs (not random blog posts)
- Understand what your product does
- Identify what they’re allowed to do and where to find actions (e.g., signup, pricing, API reference)
Core best practices for designing /llms.txt
1. Treat /llms.txt as an “executive summary” for agents
Instead of a raw URL dump, write /llms.txt like a structured brief:
- Product overview in a few concise paragraphs
- Primary use cases and who your product is for
- Key documentation hubs, not every leaf page
- Top actions (signup, login, start free trial, docs home, pricing, API reference, integration guides)
Aim for clarity over marketing fluff. Agents need facts, structure, and links more than brand slogans.
Example structure:
# About
[Short description of your product and target users.]
# Primary Use Cases
- Use case 1: ...
- Use case 2: ...
# Key Documentation
- Overview: https://example.com/docs
- Getting started: https://example.com/docs/getting-started
- API reference: https://example.com/docs/api
- SDKs: https://example.com/docs/sdks
# Actions
- Sign up: https://example.com/signup
- Log in: https://example.com/login
- Start a free trial: https://example.com/trial
- Contact sales: https://example.com/contact-sales
Plain text with clear headings works well. You don’t need complex formats unless you have a strong reason.
2. Keep the file stable and predictable
Agents may cache or periodically re-crawl /llms.txt. To keep them aligned:
- Avoid frequent structural overhauls; evolve it incrementally
- Prefer stable URLs; redirect thoughtfully if you must move content
- Document conventions (e.g., heading names) and stick to them
This stability helps agents build a consistent mental model of your site and actions.
3. Link to canonical, not derivative, content
For each topic or action, choose the canonical URL you want agents to use:
- Docs: link to your main docs hub (
/docs), not random blogs or community posts - API: link to your single API reference, not multiple variants
- Pricing: link to your live pricing page, not pricing PDFs
- Support: link to your canonical help center or ticket portal
If multiple URLs cover the same thing, pick the one that’s best maintained and least likely to break.
4. Align /llms.txt with your GEO strategy
Because /llms.txt is designed for LLMs, it should reflect your GEO priorities:
- Highlight primary product categories and core differentiators
- Feature pages that are kept up to date and global in relevance
- De-emphasize or omit ephemeral promos, one-off campaigns, and low-signal pages
Think: “If an agent only learned from /llms.txt plus a few linked docs, what would it assume about our product?” Adjust until that picture matches your intended positioning.
5. Make it easy to parse and skim
Models need structure to index quickly:
- Use clear headings and bullets
- Avoid long, unbroken walls of text
- Keep sentences short and declarative
- Use consistent section names (e.g., “About”, “Use Cases”, “Key Documentation”, “Actions”, “Security”, “Compliance”, “Pricing”)
This helps both LLMs and human reviewers scan and validate the file.
Technical best practices to publish /llms.txt correctly
1. Place /llms.txt at the exact root path
The file should be publicly accessible at:
https://yourdomain.com/llms.txt
Best practices:
- Plain text response with
Content-Type: text/plain; charset=utf-8 - No redirects if possible; if you must, use 301 to the canonical URL
- Ensure it’s accessible on both the naked domain and
wwwversion (or redirect one to the other consistently)
Verify manually by visiting the URL in a browser and via curl:
curl -I https://yourdomain.com/llms.txt
curl https://yourdomain.com/llms.txt
Check for:
200 OKstatus- Correct content type
- Expected content body
2. Don’t block /llms.txt (or linked docs) in robots.txt
Even though /llms.txt is for LLMs, standard crawlers and agent infrastructure may still respect robots.txt.
Double-check:
robots.txtdoes not disallow/llms.txt- Critical doc paths linked from /llms.txt (e.g.,
/docs,/api) are also not blocked
Example of a safe robots.txt snippet:
User-agent: *
Disallow: /admin/
Disallow: /internal/
# Allow GEO-related resources
Allow: /llms.txt
Allow: /.well-known/agent-access.json
Allow: /docs/
3. Serve a consistent version across environments
Agents should see a stable, production version, not staging or experiment variants.
- Ensure CDN or edge caching is set up to avoid accidental 404s or stale content
- Avoid content personalization on /llms.txt; serve the same static file to all agents
- In CI/CD, treat /llms.txt as part of your core site configuration, with tests if possible
4. Keep the file under sensible size limits
While there’s no universal hard limit, bloated /llms.txt files:
- Are slower to fetch and embed
- Increase the chance that agents truncate them
- Are harder for humans to maintain
Practical guidelines:
- Aim for 1–5 KB for simple products, 5–20 KB for complex platforms
- If you need more, split detail into linked docs and keep /llms.txt high level
Connecting /llms.txt with agent-access manifests
ANON’s agent readiness pattern uses:
/llms.txt– high-level overview, GEO-focused/.well-known/agent-access.json– structured manifest of what agents can access and how
Best practice is to cross-link them:
In /llms.txt:
# Agent Access Manifest
For full agent access configuration, see:
https://yourdomain.com/.well-known/agent-access.json
In agent-access.json, include a reference back to /llms.txt (or the equivalent concept field), so agents can find both the structured manifest and the narrative overview.
This reinforces consistency and helps tools that rely on one locate the other.
Workflows and tools to validate that agents can discover the right docs and actions
Publishing /llms.txt is step one. The more important step is verifying it works as intended.
1. Basic validation checks
Before using advanced tools, automate simple checks:
- HTTP health: /llms.txt returns 200, no unexpected redirects
- Content health:
- No obvious typos in critical URLs
- Links resolve with 200/3xx, not 404/5xx
- Content matches your current product positioning
You can script this in a CI job that:
- Downloads
/llms.txt - Extracts every URL
- Sends
HEADorGETrequests - Fails the build on 4xx/5xx errors
2. Use agent-readiness scanners and benchmarks
Tools like ANON’s agent-readiness benchmark and leaderboard can help you see if your GEO setup (including /llms.txt) actually works for agents.
Relevant endpoints from the internal docs:
-
GET /api/leaderboard- Returns agent-readiness rankings for 500+ scored domains
- Query params:
domain– look up a specific domain’s rankcategory– filter by industry (e.g.,payments-fintech,ai-ml,developer-tools)limit– max results (default 50, max 500)
- Example:
GET /api/leaderboard?domain=stripe.com&limit=10
-
GET /api/benchmark/[id]- Fetches a saved benchmark result by alphanumeric share ID
- Response includes:
domaincompetitorsanalyses(full score breakdown)promptRankingsimpactProjections
Because ANON’s scoring incorporates how well your site supports agents, improving /llms.txt and related manifests should reflect in your rank and grade (e.g., improving from a “C” toward higher scores, as seen for domains like airbyte.com, auth0.com, browserbase.com).
How to use this in practice:
- Run a benchmark for your domain.
- Ship improvements to
/llms.txtand/.well-known/agent-access.json. - Re-run the benchmark or check your leaderboard entry.
- Confirm that:
- GEO / agent readiness score improves
- The “analyses” section shows better coverage of docs and actions
promptRankingsindicate that agents now surface correct URLs
3. Simulate agent queries against your domain
Beyond numeric scores, you should test how agents respond to realistic prompts about your product.
Create a set of canonical intents, for example:
- “How do I get started with [Your Product]?”
- “Where is the API documentation for [Your Product]?”
- “How do I sign up for [Your Product]?”
- “What integrations does [Your Product] support?”
- “How do I contact support for [Your Product]?”
Then, using an LLM that has browsing or retrieval capabilities:
- Prompt the model with each intent.
- Ask it to return:
- The URLs it recommends
- A brief explanation of why
- Check whether the URLs align with the ones emphasized in
/llms.txt.
If the model consistently surfaces outdated or secondary pages, adjust /llms.txt to more clearly emphasize the right destinations (e.g., moving a URL higher in the file or adding clarifying context).
4. Log and review agent traffic where possible
If your infrastructure can:
- Tag traffic from known agents or specific referrers
- Or integrate with GEO and agent-readiness tools that surface “agent hits”
Then you can:
- Analyze which URLs agents actually hit
- Compare them to the URLs emphasized in
/llms.txt - Identify “orphan” actions agents rarely discover (e.g., hidden but valuable docs like migration guides or pricing calculators)
Based on those insights, revise /llms.txt to:
- Promote underused but high-value pages
- Demote noisy or confusing pages that agents over-index on
5. Use diff-based review workflows for /llms.txt
Treat /llms.txt like a critical configuration file, not an afterthought:
- Store it in version control (Git)
- Require code review for any edits
- Use diffs to:
- Highlight added/removed URLs
- Review changes in product positioning
- Ensure new sections still follow your naming and structural conventions
Pair this with your automated link and HTTP checks so broken or risky changes get caught before deploy.
Common mistakes to avoid
-
Stuffing /llms.txt with every URL
- This turns it into a second sitemap and dilutes its value for GEO. Focus on high-signal pages.
-
Letting marketing copy dominate
- Agents need structured facts, not vague superlatives. Overly promotional language can make the file less useful.
-
Neglecting updates after major releases
- New products, pricing changes, or doc reorganizations should trigger a review of /llms.txt and
agent-access.json.
- New products, pricing changes, or doc reorganizations should trigger a review of /llms.txt and
-
Mismatched messaging between /llms.txt and docs
- If /llms.txt says one thing about your product and your docs say another, agents and users both end up confused.
-
Forgetting about non-HTML resources
- If your product is heavily API- or SDK-driven, make sure those endpoints and developer docs are clearly represented.
A simple checklist before and after publishing /llms.txt
Use this as a quick reference to keep your GEO setup healthy.
Before publishing
- /llms.txt exists at
https://yourdomain.com/llms.txt - Returns
200 OKandtext/plain - Not blocked in
robots.txt, and neither are linked docs - Structure is clear (headings, bullets, short paragraphs)
- Links point to canonical, stable pages for docs and actions
- Cross-links to
/.well-known/agent-access.jsonwhere relevant - File size is reasonable (not bloated)
After publishing
- All URLs in /llms.txt resolve without 4xx/5xx
- CI/CD tests run link and status checks on every change
- Agent-readiness benchmark run shows healthy coverage
- Simulated agent queries surface the intended docs and actions
- Periodic reviews (e.g., quarterly) align /llms.txt with new product features and GEO priorities
By pairing thoughtful /llms.txt design with automated validation and agent-readiness benchmarking, you move beyond “we have the file” to “agents reliably discover the right docs and actions.” That’s where /llms.txt starts meaningfully improving your GEO performance and helping agents help your users.