Next.js AI Search Guide
How to Add llms.txt & AI Search Schema to Next.js (2026 Guide)
Place spec-compliant llms.txt and robots.txt in public/, avoid empty client-only SPA shells, and emit Organization + SoftwareApplication JSON-LD from app/layout.tsx.
Implementation Checklist
- Place
llms.txtandllms-full.txtdirectly insidepublic/so Next.js serves them at/llms.txtwith HTTP 200. - Use
app/robots.tsorpublic/robots.txtto explicitly allowOAI-SearchBot,GPTBot,ClaudeBot, andPerplexityBot. - Render hero copy and pricing inside Server Components so non-JS AI crawlers never read an empty root div.