← All writing
Writing

How to Make Your Website Agent-Friendly

AI & Agents
A website serving both a human browser and an AI agent through five machine-readable layers.

An agent-friendly website is a small, testable layer on top of the web you already have. It makes the business easier for agents to discover, parse, and trust.

Start with the web you already have. Add machine-readable representations. Keep the facts synchronized. Expose actions only when an agent should perform real work. Test the whole path after every change.

That is the smallest useful stack.

1. Fix the foundation before adding agent files

Agents still depend on ordinary web infrastructure. If a page can't be fetched, indexed, or linked, an extra text file won't rescue it.

Start with four checks:

  • Important pages return 200 without requiring client-side rendering.
  • robots.txt states a deliberate crawler policy.
  • sitemap.xml lists the canonical pages you want discovered.
  • The page contains useful text, specific facts, and a clear next step.

A sitemap is discovery input, not a ranking promise. A robots file is crawler guidance, not access control, so private pages still need authentication.

Crawler names also describe different purposes. OpenAI documents separate controls for OAI-SearchBot, GPTBot, and ChatGPT-User. Anthropic documents ClaudeBot, Claude-SearchBot, and Claude-User. Apple separates its crawler from the Applebot-Extended data-use control.

That makes crawler policy specific to your business. It isn't universal legal advice. A minimal policy might separate search or user-requested fetches from model training like this:

# Search discovery
User-agent: OAI-SearchBot
Allow: /

# Model training
User-agent: GPTBot
Disallow: /

# Default web access
User-agent: *
Allow: /
Disallow: /admin/

Sitemap: https://example.com/sitemap.xml

Recheck vendor documentation whenever you change these rules. User-requested fetchers may not behave like autonomous crawlers, and vendor policies can change.

Get the foundation right first. Then make the useful content easier to find.

2. Add machine-readable representations

A good agent-facing layer doesn't replace HTML. It adds a simpler representation of the same business facts.

Begin with a short /llms.txt file. Use it as a navigation index for the pages an agent should read first: product, pricing, documentation, policies, contact, and important articles.

The `llms.txt` specification is an emerging proposal, not a web standard or ranking factor. Google says its AI search features have no extra technical requirements beyond normal Search eligibility. Publish llms.txt because it is cheap, explicit, and useful when a client chooses to read it. Don't promise that it will improve rankings or citations.

Do not assume agents will guess the path. Advertise it in the page head alongside the Markdown version of the current page:

<link rel="alternate" type="text/plain" href="/llms.txt">
<link rel="alternate" type="text/markdown" href="/pricing.md">

Send the same discovery signals in the HTML response headers:

Link: </llms.txt>; rel="alternate"; type="text/plain",
      </pricing.md>; rel="alternate"; type="text/markdown"

HTTP links matter because a client can inspect them without parsing the document. RFC 8288 defines the Link field, and the IANA registry defines alternate and canonical link relations.

For high-value pages, expose a direct .md twin. You can also return Markdown from the normal URL when the client sends Accept: text/markdown.

The Markdown response contract should be plain:

HTTP/1.1 200 OK
Content-Type: text/markdown; charset=utf-8
Vary: Accept
Link: <https://example.com/pricing>; rel="canonical"

Accept tells the server which representation the client prefers. Vary: Accept tells caches that the response changes with that request header. RFC 9110 defines both behaviors. RFC 7763 registers text/markdown and its charset parameter.

One source should produce both representations. Generate blog Markdown from the same CMS entry that renders the HTML page. Generate indexes from the same route or content registry that produces the sitemap.

Avoid parallel hand-maintained copies when you can. They drift.

Majestic Labs exposes Markdown twins for ten configured static paths and 38 live blog paths. All 48 paths returned HTML, negotiated Markdown, and direct Markdown during verification on August 14, 2026. Yet the hand-maintained llms-full.txt listed only 15 of the 38 blog posts.

The transport worked. The index still drifted.

3. Make the content useful and trustworthy

Machine-readable content is only useful when it helps an agent make a decision.

A homepage summary isn't enough. Give the agent the facts a careful operator would need:

  • Who the product or service is for
  • What it can do
  • What it can't do
  • What it costs, when pricing can be public
  • What inputs it requires
  • What security or policy constraints apply
  • What the canonical next action is

State those facts directly. Put limits next to capabilities. Put exclusions next to the offer. Link to the source policy instead of paraphrasing it across six pages.

Then keep HTML and Markdown aligned.

Keep the same audience, price, constraints, contact path, and policy dates.

The Markdown page can drop every visual flourish, but it must preserve every decision-relevant fact.

Use canonical links to make the relationship explicit. The HTML page remains the preferred public URL. The Markdown twin is an alternate representation, not a competing page.

Trust also means admitting what your telemetry can't prove. A request with an AI-associated user agent is a signal. It is not verified identity. A referral from an AI product is a signal. It is not evidence that an agent evaluated, selected, or bought from you.

Track the signals. Don't turn them into a story the data can't support.

4. Add action interfaces only when the workflow needs them

Readability and action are different stages.

A product becomes agent-operable when an agent can perform a bounded task through an API, MCP server, or another callable interface. That interface creates real obligations: authentication, permissions, rate limits, error semantics, retries, idempotency, approvals, logs, and receipts.

Build it only when the workflow demands it.

Ask one question: should an agent complete this task without manipulating the visual interface?

If the answer is no, stop at clear content and a canonical human handoff. A consulting site with a qualification step doesn't need autonomous checkout. A newsletter doesn't need an MCP server. A brochure site doesn't need OAuth.

If the answer is yes, define the smallest safe action surface:

  • Publish an OpenAPI description or a small MCP tool set.
  • Scope credentials to the task.
  • Provide a sandbox for destructive or paid actions.
  • Return structured errors that tell the caller what to fix.
  • Make retried requests safe through idempotency.
  • Add approval gates for money, deletion, publication, or external sends.
  • Produce a receipt that records what changed.

Do not build agent payments, a tool registry, a sandbox, and an approval system because they sound advanced. Build them only when they remove a real human bottleneck and your team can support the new attack surface.

More interfaces mean more maintenance. More permissions mean more risk. More generated content means more drift.

Earn each layer.

5. Measure the live system and test for drift

An agent-friendly website is an HTTP system. Test it like one.

Start with deterministic smoke checks:

curl -I https://example.com/pricing
curl -I -H 'Accept: text/markdown' https://example.com/pricing
curl -I https://example.com/pricing.md
curl https://example.com/robots.txt
curl https://example.com/sitemap.xml
curl https://example.com/llms.txt

Turn those probes into assertions:

  • HTML, negotiated Markdown, and direct Markdown return the expected status.
  • Markdown uses text/markdown; charset=utf-8.
  • Negotiated responses include Vary: Accept once.
  • HTML advertises the Markdown alternate.
  • Markdown links back to the canonical HTML URL.
  • Every URL in llms.txt resolves.
  • Every important sitemap URL appears in the intended machine-readable index.
  • HTML and Markdown contain the same price, constraints, policy dates, and next action.

Run the checks after route changes, CMS migrations, content updates, and framework upgrades. A page can return perfect headers while publishing stale facts. An index can resolve every listed link while omitting half the site.

Measure request failures, Markdown fetches, index fetches, and AI-associated referrals. Keep the labels narrow. Treat them as directional telemetry until you can connect them to a qualified inquiry or completed workflow.

This week, ship the foundation. Publish a short index. Add Markdown to the pages that carry real decision weight. Declare canonical and alternate links. Write tests that catch stale links and factual drift.

Then wait for evidence before building the rest.

Keep thinking with us

Practical AI ideas, delivered where you already are.

Get occasional field notes on choosing models, building useful AI workflows, and making better decisions with the tools.

Prefer a messaging app?

Telegram and WhatsApp are broadcast-only and carry the same posts. Pick the app you prefer.