AgentScan logoAgentScan
Generators

RFC 8288 Link Headers Builder

Build a single Link header value with multiple relations. Useful for exposing machine-readable references on the homepage so agents can discover your APIs and content map.

Link entries

Add one row per resource. The href can be relative or absolute.

Header value

text · 1 line · 265 B

Link: </.well-known/api-catalog>; rel="api-catalog", </llms.txt>; rel="describedby"; type="text/plain", </sitemap.xml>; rel="sitemap"; type="application/xml", </rss>; rel="alternate"; type="application/rss+xml", </atom>; rel="alternate"; type="application/atom+xml"

Next.js proxy.ts snippet

typescript · 19 lines · 673 B

import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";

const LINK_HEADER =
  "</.well-known/api-catalog>; rel=\"api-catalog\", </llms.txt>; rel=\"describedby\"; type=\"text/plain\", </sitemap.xml>; rel=\"sitemap\"; type=\"application/xml\", </rss>; rel=\"alternate\"; type=\"application/rss+xml\", </atom>; rel=\"alternate\"; type=\"application/atom+xml\"";

export function proxy(request: NextRequest) {
  if (request.nextUrl.pathname !== "/") {
    return NextResponse.next();
  }
  const response = NextResponse.next();
  response.headers.set("Link", LINK_HEADER);
  return response;
}

export const config = {
  matcher: ["/"],
};

Apply this with your coding agent

Get a ready-made prompt that wraps the output above with implementation steps. Paste it into your AI assistant and let it ship the change.

Common rel values

  • api-catalog for /.well-known/api-catalog
  • describedby for llms.txt or other docs
  • sitemap for sitemap.xml
  • alternate for RSS, Atom, or markdown
  • service-doc for human API docs URLs
  • service-desc for OpenAPI documents

Verify on a real URL

Run a full agent readiness scan to see how your live site responds end to end.

Scan a URL

Related tools