# Missing llms.txt in Next.js

> How to fix missing llms.txt in Next.js — with the exact fix and copy-paste code.

_Category: AI readiness · Detector `aeo` · Check `llms-txt-missing` · Severity: info_

`llms.txt` is the emerging convention for handing LLMs a clean, curated markdown map of your site — what it is, and links to the pages you most want read — instead of leaving them to scrape rendered HTML full of navigation and markup. As assistants increasingly answer questions using your content, an `llms.txt` is a cheap way to steer them to the right, accurate source.

## The fix for Next.js

Serve it from a Route Handler at `app/llms.txt/route.ts`, or generate it from your content and write it to `public/` at build. A route handler lets you build the link list from your real pages.

_app/llms.txt/route.ts_

```ts
export function GET() {
  const body = `# Acme Docs\n\n> Summary.\n\n## Guides\n- [Quickstart](https://acme.com/docs/quickstart)\n`
  return new Response(body, { headers: { 'Content-Type': 'text/plain; charset=utf-8' } })
}
```

### Steps

1. Write `/llms.txt`: an H1 title, a one-line summary, then curated link sections
2. Link your most important, canonical pages with a short description each
3. Serve it from the site root with a `text/plain` or markdown content type

## How VibeCheck detects it

The `aeo` detector flags this live in the browser and reports it to the widget's Problems list — and to your coding agent over MCP.

- **Issue string:** `No llms.txt`
- **Threshold:** /llms.txt is not served as a 2xx text/plain or markdown response

## FAQ

### Is `llms.txt` an official standard?

It’s an emerging convention, not a formal standard, but it’s increasingly recognised. It costs almost nothing to add and gives you a curated surface for LLMs, which is why it’s worth doing.

### What’s the difference between `llms.txt` and `robots.txt`?

`robots.txt` controls what crawlers may access; `llms.txt` is a positive, curated markdown summary that points LLMs to your best content. They’re complementary.

### What should I put in it?

A title, a one-line description of the site, and grouped links to your most important canonical pages, each with a short description. Keep it concise and current.

See the general, framework-agnostic fix: https://vibecheck.wcgw.fun/fix/missing-llms-txt.md

---

Fix guide from VibeCheck — https://vibecheck.wcgw.fun/fix/missing-llms-txt. Full site index for LLMs: https://vibecheck.wcgw.fun/llms.txt
