---
name: link-headers
description: Add Link response headers (RFC 8288) for agent discovery
---

# Add Link response headers (RFC 8288)

Send `Link:` response headers from your homepage that point agents at related resources (sitemap, llms.txt, MCP server card, OAuth metadata, …).

## Requirements

- Send a `Link` HTTP response header on at least the homepage
- Use registered link relations from the IANA Link Relations registry
- Each value: `<URL>; rel="relation-name"`

## Example

```
Link: </sitemap.xml>; rel="sitemap",
      </llms.txt>; rel="llms-txt",
      </.well-known/api-catalog>; rel="api-catalog",
      </.well-known/mcp/server-card.json>; rel="service-desc"
```

In Next.js, set headers in `next.config.ts` under `async headers()` or in `middleware.ts`.

## References

- [RFC 8288 — Web Linking](https://www.rfc-editor.org/rfc/rfc8288)
- [IANA Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)
