Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To make a Next.js site easier for AI agents to read, publish a concise /llms.txt index, provide Markdown versions of useful pages, and explicitly link the two formats. You can also serve Markdown when a client requests Accept: text/markdown, but that is an optional content-negotiation approach—not a requirement of the llms.txt proposal, and not universally supported by clients.

What llms.txt does—and what it does not do

llms.txt is a community proposal for a concise Markdown guide to a site or section: it helps an agent find relevant, more detailed content. The proposal by Jeremy Howard, modified August 10, 2026, requires only an H1 naming the project or site. A short summary, explanatory text, and H2 sections containing links are optional. The proposal describes a content map, not a crawler-permission mechanism; it does not replace robots.txt.

An index can live at the site root or under a path. It applies to pages beneath that location, and the most specific applicable file should be used. The proposal’s v2 changes also clarify that the conventional Optional section is for secondary links; it no longer has its former mechanical role in context-expansion tooling. See the llms.txt proposal and its v2 changes.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How to structure a useful index

Keep the index selective: its job is to help a reader or agent choose a relevant document, not to reproduce your whole site. Start with the required H1, add a brief description if useful, then group important links under descriptive H2 headings. Link to Markdown versions where you publish them.

For example, a documentation site might organize its links under sections such as “Getting started,” “API reference,” and “Deployment.” These are illustrative headings, not required labels. Prioritize stable, useful pages over exhaustive inventories, and make the link text explain what each document covers.

How to publish Markdown page mirrors

A mirror is a clean Markdown representation of an HTML page. The proposal allows either an appended extension, such as guide.html.md, or an extension-replacement form, such as guide.md. For directory-style pages, it gives patterns such as index.html.md and index.md. Choose one convention and apply it consistently; keeping the mirror aligned with its HTML page is a publishing responsibility.

Once a mirror exists, advertise it from the HTML page using the relationship rel="alternate" and the media type text/markdown. Also identify the applicable index with rel="describedby". The proposal describes putting these relationships in HTML <link> elements or HTTP Link headers. For example, HTML can include:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
<link rel="alternate" type="text/markdown" href="/docs/guide.md">
<link rel="describedby" href="/llms.txt">

Use the actual mirror and index paths for the page. Explicit links let clients discover the resources without relying only on guessed filename patterns.

How to serve these files in Next.js

Next.js route handlers are one way to serve an index, a full-text resource, or a Markdown page. Vercel Academy demonstrates App Router handlers for /llms.txt, /llms-full.txt, and a Markdown docs route. In its example, the index and full-text resource use text/plain; charset=utf-8, while the page mirror uses text/markdown; charset=utf-8. The guide is an implementation example, not a guarantee that every Next.js version or deployment environment behaves identically. Consult Vercel Academy’s Next.js guide and verify your routes in your own deployment.

Whichever publishing approach you use, check that each route returns the intended content and content type, and that the HTML page’s discovery links point to the correct resources. If you generate mirrors from page content, include synchronization in the publishing process so changes to the HTML do not leave the Markdown stale.

Should you support Accept: text/markdown?

Content negotiation lets a client request a Markdown representation at a URL by sending Accept: text/markdown. Your server can return Markdown when it supports that representation. This is an additional option, not part of the llms.txt proposal’s stated requirements. The proposal and Vercel guide document explicit Markdown URLs and discovery links; they do not establish universal support for this request header across agents, browsers, or intermediaries.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If you implement negotiation, test clients and infrastructure that matter to your site, including the CDN and cache path. Responses that vary by the Accept header need cache behavior that keeps representations separate. Do not assume a client will send the header or understand the response; retain discoverable Markdown URLs if you want to make mirrors directly available.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

How to check the setup

Use Lighthouse as a retrieval-error check, not as evidence that agents have discovered your content or that the setup improves rankings, citations, or traffic. Chrome for Developers’ documentation, last updated May 5, 2026 UTC, says the audit is optional and emerging: a 404 for llms.txt is marked Not Applicable, while a server error fetching the file is flagged. Review the Lighthouse llms.txt documentation for the audit’s current behavior.

Neither the proposal nor the implementation guide establishes a measured effect on search visibility, citations, or agent usage. Treat these files as a way to offer structured, readable content—not a promise that a particular system will find or use it.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.