Next.js App Router & Vercel Blueprint: Deterministic /llms.txt, /pricing.md & /ai/summary.json
Updated 2026-11-14 · Telemetry across 2459 audited B2B SaaS domains
In our HTTP/HTML readiness check of 2459 B2B SaaS domains, Next.js sites using dynamic app/[...slug]/page.tsx or localized middleware.ts redirects frequently intercept /llms.txt, /pricing.md, and /ai/summary.json, returning locale redirects or 239.7 KB RSC HTML shells instead of clean UTF-8 text and JSON.
1. Bypass Locale & Auth Redirects in middleware.ts
import { NextResponse, type NextRequest } from "next/server";
const ASO_PATHS = new Set([
"/llms.txt", "/llms-full.txt", "/pricing.md", "/answers.md",
"/.well-known/ai.txt", "/.well-known/mcp.json",
"/ai/summary.json", "/ai/faq.json", "/ai/service.json"
]);
export function middleware(req: NextRequest) {
if (ASO_PATHS.has(req.nextUrl.pathname)) return NextResponse.next();
const res = NextResponse.next();
res.headers.set("Link", '</llms.txt>; rel="llms-txt", </.well-known/mcp.json>; rel="mcp"');
return res;
}
2. Ship All 26 Validated Files + GitHub Actions Regression Gate
Place your deterministic plain-text and JSON specifications under public/ and enforce an automated HTTP/HTML readiness check in CI via .github/workflows/aso-score-gate.yml so future marketing deploys never strip your Schema.org @graph or agent feeds.