Next.js / Vercel
Make a Next.js app agent-ready: static files, route handlers, and OG metadata.
Next.js gives you typed APIs for every metadata signal AIScan looks at. App Router projects can move every fix from "a file you forgot to update" to "code reviewed in a PR".
Start at the platform guide index for other stacks, or compare this setup with the Replit guide when a project is Vite or Express instead of App Router. These fixes map to Content, Discoverability, Bot Access, and Capabilities checks.
Per-route metadata
Export metadata (or generateMetadata) per page and per layout:
// app/about/page.tsx
export const metadata = {
title: "About — Acme",
description: "How Acme came to be.",
alternates: { canonical: "https://acme.com/about" },
openGraph: {
title: "About — Acme",
description: "How Acme came to be.",
url: "https://acme.com/about",
type: "article",
},
};robots.ts / robots.txt
App Router supports a typed app/robots.ts that AIScan reads the same as a static file:
// app/robots.ts
import type { MetadataRoute } from "next";
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{ userAgent: "*", allow: "/" },
{ userAgent: ["GPTBot", "ClaudeBot", "PerplexityBot", "Google-Extended"], allow: "/" },
],
sitemap: "https://acme.com/sitemap.xml",
};
}sitemap.ts
// app/sitemap.ts
import type { MetadataRoute } from "next";
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const posts = await getPosts();
return [
{ url: "https://acme.com/", changeFrequency: "weekly", priority: 1.0 },
...posts.map((p) => ({
url: `https://acme.com/blog/${p.slug}`,
lastModified: p.updatedAt,
})),
];
}Public & .well-known files
Drop llms.txt, CLAUDE.md, aiscan-skill.json, and any .well-known/* files into public/. Next.js serves them at the matching site path. For dynamic content (an MCP server card derived from your DB), expose a route handler at app/.well-known/mcp/server-card.json/route.ts that returns JSON.
Edge headers (Vercel)
Add a Link response header in middleware.ts or vercel.json:
// vercel.json
{
"headers": [
{
"source": "/(.*)",
"headers": [
{ "key": "Link", "value": "</.well-known/api-catalog>; rel=\"api-catalog\"" }
]
}
]
}Further reading
- How to ship one h1, title, meta description and JSON-LD on Next.js
Next.js hands you a Metadata API that writes your <title and your meta description into the head automatically. It does not write your JSONLD, and it does not write your <h1. Those two are ordinary…
- AI Crawler Traffic in 2026: Only 51.8% of Sites Can Answer "Nothing Changed"
Verified 5 September 2026. All measurements in this article were taken on that date. Every AI crawler that visits your site asks the same handful of questions over and over. Where is your robots.txt.…
- llms.txt vs robots.txt vs sitemap.xml in 2026: Six Files, Six Jobs
Verified 4 September 2026. Every figure below was measured or fetched on that date. Three files keep getting compared as if they were competing for the same job: robots.txt, sitemap.xml and llms.txt.…
- The State of AI Agent Readiness in 2026: 473 Sites Measured
Half of the web's agentreadiness problem is already solved, and almost nobody has noticed which half. Across 473 real websites scanned by AIScan between 24 August and 3 September 2026, the median…
- Cloudflare Agent Readiness vs Chrome's Agentic Browsing Audit in 2026: 28 Checks, One Overlap
Verified 31 August 2026. Every score, status code and audit weight below was produced on this date by running both tools live. The Lighthouse figures come from Lighthouse 13.4.1 driving Chrome for…
- The complete AI readiness setup for Next.js in 2026
Next.js gives you five of the files AI crawlers look for, and four of them are one file away. The setup below takes about 40 minutes on an App Router project and moves a typical Next.js site from a…
- Your Next.js Site Ranks on Google and Is Invisible to ChatGPT: How to Prove It
Googlebot runs your JavaScript. The crawlers that build ChatGPT's and Claude's indexes, as far as anyone has measured, do not. That gap is why a React or Next.js site can hold page one on Google and…
- How to publish a valid llms.txt on Next.js
AIScan's C2 check is worth 6 points, and on Next.js you can earn it in about two minutes. C2 passes when /llms.txt returns 200 and the file contains an H1, at least one section, and markdown links.…