Website Spec
← Agent Readiness
Recommended

HTTP Link headers for discovery

Use the HTTP Link header to advertise machine-readable resources — llms.txt, sitemap, api-catalog, RSS — directly in the response. Agents that never parse your HTML can still find what they need.

What it is

The Link HTTP response header points the client at related resources. It is the same mechanism as <link rel="…"> in HTML — same syntax, same registered relation types — except it travels with every response, including responses that have no HTML body (a JSON endpoint, a PDF, a 204).

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Link: </llms.txt>; rel="describedby"; type="text/markdown"; title="Site index for LLMs",
      </.well-known/api-catalog>; rel="api-catalog"; type="application/linkset+json",
      </sitemap-index.xml>; rel="sitemap"; type="application/xml",
      </rss.xml>; rel="alternate"; type="application/rss+xml"

Multiple links may be sent as comma-separated entries inside a single Link header (the form above) or as several Link headers. Both are valid per RFC 8288 §3.

Why it matters

How to implement

Pick registered relation types. The IANA Link Relations Registry is the source of truth. Inventing your own is a bad signal. The relations a content site usually wants:

| rel | Purpose |

|---|---|

| describedby | A machine-readable description of this resource. Right for llms.txt. |

| alternate | An alternative representation of the same content (different format or language). Right for .md siblings, RSS, Atom, JSON Feed. |

| api-catalog | RFC 9727 — the location of /.well-known/api-catalog. |

| sitemap | The XML sitemap (or sitemap index). |

| service-desc / service-doc | A machine-readable / human-readable description of an API. |

| security | The security.txt policy. |

| author | Author resource. |

| license | Licence terms. |

Send absolute or root-relative URLs. Both are valid in Link; prefer root-relative for portability across protocols and ports.

Include type and title. They are optional in the header but make the link self-describing without an extra fetch.

Ship on the homepage at minimum. If you can afford it, ship on every response — the discovery benefit compounds when the agent enters mid-site.

Edge configuration is the right layer. Set Link headers at the CDN or reverse proxy, not in application code, so non-HTML responses get them too. On Cloudflare Pages this is one line in _headers. On nginx it is add_header Link …;. On Vercel and Netlify it is config-driven.

Common mistakes

Verification

Sources