Practical guide
robots.txt, Sitemap, llms.txt, and ai-agent.json: What Each File Proves
Separate established web protocols from emerging agent conventions and verify what each discovery file can actually demonstrate.
By AgentReady Editorial Team. Technical review: AgentReady Engineering.
robots.txt: crawl instructions, never authorization
robots.txt lives at the origin root and expresses crawler-specific allow or disallow rules according to documented parsing behavior. It can also declare one or more sitemap locations. Test the exact canonical origin, final response, text body, and groups that apply to the crawler you care about. A missing file, a broad Disallow rule, and a file served through an HTML catch-all are three different findings. The file is public and advisory; it does not authenticate a requester or protect private content. Sensitive routes need real access control regardless of what robots.txt says. [AR1]
Keep the file small and generated from deliberate policy. Comments are useful for maintainers, but never place tokens, private paths, internal hostnames, or debugging notes there. When you name an agent-specific group, document why it differs from the general policy and review that decision as product and legal requirements change. Confirm that the sitemap line uses the public canonical URL and that deployment routing returns text rather than the application shell. [AR1][AR7]
- Verify: Fetch /robots.txt on the canonical host, inspect Content-Type and body, and test the applicable group against critical public routes.
- Do not infer: A permissive file does not prove indexation, agent compatibility, permission to act, or protection of private routes.
sitemap.xml: a canonical URL inventory
A sitemap supplies preferred public URLs and optional metadata in a defined XML vocabulary. It helps discovery but does not guarantee crawling or indexing. Every entry should resolve to useful indexable content on the canonical host. Sample the URLs for redirects, soft 404s, login walls, inconsistent canonical tags, and HTML shells. Use lastmod only for material content changes; a generated current timestamp on every build creates noise rather than freshness evidence. [AR2]
For a small site, validate every URL. Larger inventories can combine deterministic generation with representative live checks. Keep search results, duplicate parameter forms, account pages, and noncanonical hosts out. If you split a large inventory, use a sitemap index and keep each child feed internally consistent. Finally, link the sitemap from robots.txt and submit the same canonical endpoint to search tools; conflicting URL sets make diagnosis harder. [AR1][AR2]
- Verify: Check XML syntax, XML media type, canonical hosts, response status, redirect count, page canonical, and truthful lastmod values.
- Do not infer: A successful fetch does not prove that every listed page is valuable, indexed, current, or usable by an agent.
llms.txt and ai-agent.json: useful conventions with variable support
An llms-oriented text file can point readers or tools toward concise documentation, while an ai-agent-style JSON document can describe product-specific capabilities. Neither name alone establishes a universal contract. Google says llms.txt is ignored by Google Search and neither helps nor harms visibility or rankings there. Publish the file only for readers or tools that choose to consume it, and only when you can explain the intended consumer, owner, update process, and limitations. [AR7][AR11][AR13]
Validate every referenced URL and make capability language conservative. A manifest should not claim that an operation is safe, available, or unauthenticated unless production enforces exactly that behavior. Do not include secrets or internal implementation details. Prefer generation from the same registry that powers documentation so routes do not drift. A regression test should parse the payload, follow links, and compare the declared version or operation set with the deployed service. [AR6][AR7]
- Verify: Document status as emerging or product-specific, parse the file, check links, assign an owner, and test declared capabilities separately.
- Do not infer: Presence does not prove broad tool support, trustworthy instructions, successful task completion, or safe authorization.
One domain, four artifacts: a concrete comparison
For example.com, /robots.txt can say which public paths a crawler may request and point to https://example.com/sitemap.xml. The sitemap can enumerate canonical product, pricing, documentation, and policy URLs with truthful last modification dates. /llms.txt can provide a concise human-readable index to those maintained pages for voluntary consumers. /.well-known/ai-agent.json can describe product-specific discovery metadata. The four responses should agree on the canonical host, but each has a different parser, maintenance owner, and proof boundary. [AR1][AR2][AR7][AR13]
Test each route as a deployment artifact. A 200 response is insufficient if /llms.txt returns the HTML homepage, if sitemap entries redirect to a different host, or if the manifest advertises an operation production does not support. Then test the customer journey separately: finding pricing, preparing signup, or calling one harmless documented API operation. This distinguishes discoverability from operability and keeps an emerging file from becoming a substitute for product evidence. [AR1][AR2][AR6][AR7]
- /robots.txt: Verify plain text, applicable crawler groups, public crawl policy, and the canonical sitemap reference.
- /sitemap.xml: Verify XML, canonical indexable URLs, real pages, and material lastmod values.
- /llms.txt: Verify text rather than HTML, a truthful summary, maintained absolute links, and no ranking claim.
- /.well-known/ai-agent.json: Verify JSON parsing and independently test every advertised capability, authentication rule, and safety boundary.
OpenAPI: a formal description that still needs production verification
OpenAPI can define paths, operations, inputs, outputs, security schemes, and servers in a machine-readable document. That makes it more formal than a prose hint, but the document can still be incomplete or stale. Validate it with a standards-aware tool, resolve references, and compare harmless operations against the actual service. Authentication requirements, error responses, idempotency expectations, rate limits, and consequence should be visible to users even when they are not all expressible in one schema. [AR6]
Treat the specification as one layer of an authorization system, not the authorization system itself. The server must validate identity, permission, targets, and state on every request. Exclude secret example values and avoid publishing internal-only servers accidentally. Version changes deliberately, retain a correction path, and rerun contract checks after deployment. Pair the API description with browser-task tests when the product also exposes a graphical interface. [AR6][AR7]
- Verify: Parse, validate, compare servers and operations with production, test one read-only request, and review security schemes and error truth.
- Do not infer: A valid document does not prove correct authorization, reliable uptime, safe side effects, or compatibility with every agent.
A practical publication order
First repair canonical routing and useful HTML. Second publish a real sitemap and a deliberate robots policy. Third add formal API documentation when a public API exists. Only then add experimental orientation files where they serve a named workflow. This order protects against spending time on fashionable files while primary pages remain uncrawlable or primary controls remain ambiguous. Keep a table of artifact, governing standard or convention, owner, generated source, verification command, and last material review. [AR1][AR2][AR6][AR7]
After publication, test user outcomes. Ask an agent or deterministic browser to find a page, cite a fact, navigate to the free scan, and stop before an external consequence. Record failures and repair the underlying information architecture, semantics, or safety boundary. Discovery artifacts should shorten a reliable path; they should never substitute for the path itself. AgentReady's free scan can flag several protocol and crawl signals, but confirm every result against the official specifications and your production behavior. [AR1][AR2][AR11]
- Inventory: List what exists today and classify it as established standard, emerging convention, product-specific declaration, or ordinary documentation.
- Test: Fetch and parse each artifact, then run the separate end-user task it is supposed to support.
- Maintain: Tie route, API, auth, and content changes to review or regeneration so declarations cannot silently drift.
Try the examples on a live surface
Continue with a focused tool or outcome guide instead of treating this article as the final verification.
Conclusion
Use the files for the jobs they actually perform. robots.txt communicates crawl policy; a sitemap enumerates preferred public URLs; OpenAPI formally describes an API; experimental agent files may orient specific tools. None is a certification. The durable evidence is a canonical response, a valid payload, current links and claims, server-enforced authorization, and repeatable task completion. Scan your public URL for an initial discovery check, then keep the fetch output and task trace beside the fix.
Sources
Primary and official sources checked August 27, 2026. Recheck current versions before relying on time-sensitive requirements.
- AR1: Google robots.txt specification — Google Search Central
- AR2: Sitemaps XML format — Sitemaps.org
- AR6: OpenAPI Specification — OpenAPI Initiative
- AR7: Secure Software Development Framework, SP 800-218 — NIST
- AR11: HTML Living Standard — WHATWG
- AR13: Optimizing your website for generative AI features on Google Search — Google Search Central
Related resources
Apply this to a real outcome
Use the goal-specific playbooks to turn this guide into a task contract for discovery, signup, booking, commerce, or product use.