How to Make a Next.js Site Show Up in ChatGPT and AI Overviews: llms.txt, Schema and AI Crawler Access
Most "AI SEO" advice is a list of buzzwords. This post is the opposite: the concrete things I checked, broke and fixed while auditing a production Next.js App Router site on Vercel. The stack is Next.js, server-rendered,
Most "AI SEO" advice is a list of buzzwords. This post is the opposite: the concrete things I checked, broke and fixed while auditing a production Next.js App Router site on Vercel. The stack is Next.js, server-rendered, with about 1,000 sitemap URLs.
Nothing here guarantees a citation. AI answers pull from search indexes, third-party sources and the model's own training, and nobody outside those companies controls that. What you control is whether the machines can fetch your pages, understand who you are, and quote a clean answer. That is what the checklist covers.
1. Check that AI fetchers can actually reach you
This was the most expensive finding. The site had a good robots.txt and a well-written llms.txt. But a Vercel Firewall challenge was returning 429 with a "Security Checkpoint" page to plain HTTP clients, including on /robots.txt, /sitemap.xml and /llms.txt. A real browser passes the JavaScript check. A crawler that does not run JavaScript sees a wall.
Vercel's verified-bot handling usually lets Googlebot through, so Search can look fine while other fetchers fail. Test it yourself:
for ua in "Googlebot" "OAI-SearchBot" "ChatGPT-User" "PerplexityBot" "Claude-SearchBot"; do
printf "%-18s" "$ua"
curl -s -o /dev/null -w "%{http_code}\n" -A "$ua" https://your-site.com/llms.txt
done
You want 200 for every line. If you see 429 or 403, check Vercel's Firewall and Attack Challenge Mode settings, and exclude /robots.txt, /sitemap.xml and /llms.txt from challenge rules. Note that a spoofed user agent from your laptop is not the same as the real bot coming from its published IP range, so treat this as a smoke test and confirm in your firewall logs.
2. Write robots.ts for the bots that matter
AI vendors run different crawlers for different jobs. Mixing them up is the most common robots mistake I see.
| Bot | Vendor | What it does |
|---|---|---|
GPTBot |
OpenAI | Collects training data |
OAI-SearchBot |
OpenAI | Builds the ChatGPT search index |
ChatGPT-User |
OpenAI | Fetches a page when a user asks |
ClaudeBot |
Anthropic | Training |
Claude-SearchBot |
Anthropic | Search quality |
Claude-User |
Anthropic | User-triggered fetch |
PerplexityBot |
Perplexity | Search index |
Perplexity-User |
Perplexity | User-triggered fetch |
Google-Extended |
Control token for Gemini training. It does not affect Search or AI Overviews |
Two audit findings came straight from this table. The site listed PerplexityUser instead of Perplexity-User, so that rule never matched. And it was missing Claude-SearchBot and Claude-User entirely. A one-character typo in a user agent silently does nothing.
Here is a clean app/robots.ts:
// app/robots.ts
import type { MetadataRoute } from "next";
const SEARCH_AND_USER_BOTS = [
"OAI-SearchBot",
"ChatGPT-User",
"Claude-SearchBot",
"Claude-User",
"PerplexityBot",
"Perplexity-User",
];
export default function robots(): MetadataRoute.Robots {
return {
rules: [
{ userAgent: "*", allow: "/", disallow: ["/api/", "/_next/"] },
// Explicit allow rules document intent and survive future "*" changes.
...SEARCH_AND_USER_BOTS.map((userAgent) => ({ userAgent, allow: "/" })),
// Optional: opt out of training only. Decide this on purpose.
{ userAgent: ["GPTBot", "ClaudeBot", "CCBot"], disallow: "/" },
],
sitemap: "https://your-site.com/sitemap.xml",
};
}
Whether to block training bots is a business decision. Blocking GPTBot does not stop ChatGPT search from citing you, because OAI-SearchBot is separate.
3. Ship a short, curated llms.txt
The llms.txt proposal is a Markdown file at the site root that tells models what your site is and where the best pages are. Be honest about what it does: Google has said AI Overviews rely on the normal Search index, so do not expect llms.txt to move you there. It helps tools and assistants that choose to read it.
The audited file was 72 KB and 772 lines. That defeats the purpose, because a model reading it has to dig for the point. Aim for a page or two: a one-paragraph summary, key facts, and links to your 10 to 30 best pages.
// app/llms.txt/route.ts
export const dynamic = "force-static";
const body = `# Your Company
> One factual sentence: what you are, where, since when, who for.
Key facts: HQ city, founding year, contact email, team size.
## Services
- [Service A](https://your-site.com/services/a): one line on what it is
- [Service B](https://your-site.com/services/b): one line on what it is
## Evidence
- [Case study](https://your-site.com/work/case-1): named client, real numbers
`;
export function GET() {
return new Response(body, {
headers: { "Content-Type": "text/plain; charset=utf-8" },
});
}
Keep a longer llms-full.txt if you want, but treat the short file as the one that matters. Put a real "last reviewed" date in it and keep it true.
4. Build one entity graph with JSON-LD
Search engines and LLMs resolve "who is this company" from structured data plus third-party profiles. The audited site declared a separate ProfessionalService on every city page, each with the same address and a copied rating. That fragments the entity.
Declare the organization once with a stable @id, and reference it from other pages:
// components/JsonLd.tsx
export function JsonLd({ data }: { data: object }) {
return (
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(data) }}
/>
);
}
// app/layout.tsx (inside <body>)
const org = {
"@context": "https://schema.org",
"@type": "Organization",
"@id": "https://your-site.com/#organization",
name: "Your Company",
url: "https://your-site.com",
foundingDate: "2017-12",
address: { "@type": "PostalAddress", addressLocality: "Mumbai", addressCountry: "IN" },
sameAs: [
"https://www.linkedin.com/company/your-company/",
"https://www.wikidata.org/wiki/Qxxxxxxx",
],
};
// On a service page, point back to the same entity:
const service = {
"@context": "https://schema.org",
"@type": "Service",
name: "Answer Engine Optimization",
provider: { "@id": "https://your-site.com/#organization" },
areaServed: "IN",
};
Two cautions from the audit. First, a self-written aggregateRating on your own organization will not earn review stars in Google, and it can mismatch your real review count, which hurts trust. Only mark up what a page visibly shows. Second, FAQPage markup no longer gives most sites a rich result, but it is still a clean machine-readable statement of questions and answers, so use it for real questions only.
5. Make the answer visible
The site had a direct-answer block ("What is X?") rendered with a screen-reader-only class, so the clearest summary on the page was visually hidden. Hidden primary copy gets discounted and looks like cloaking. If the answer matters to a model, it matters to a human.
// Good: visible, near the top, one or two sentences
export function DirectAnswer({ children }: { children: React.ReactNode }) {
return (
<p className="lead max-w-prose text-lg">{children}</p>
);
}
Write it like a quotable fact: who, what, where, since when. Avoid superlatives you cannot back up.
6. Clean up the small technical lies
-
Uniform
lastmod. 959 of 991 sitemap URLs carried the same date. Search engines learn to ignorelastmodwhen it is not page-accurate. Use real modified dates or leave the field out. - Thin templated pages. About 1,000 city and service combinations produced huge impressions and almost no clicks. Cut or merge pages that do not answer a distinct question.
- Staging under your domain. Client test sites on subdomains were indexed under the main domain. Use a separate domain for staging or rely on noindexed preview URLs.
-
Default
og:title. Seven pages reused the homepage title for social previews. Set per-page metadata withgenerateMetadata.
7. Entity signals outside your site
Models and search both lean on third-party sources. Check that your name, address, team size and description match across LinkedIn, Google Business Profile, industry directories and Wikidata. In the audit, directory profiles disagreed with the website on address and headcount, with one showing an unrelated address. Conflicting facts lower trust. Fix them, add the profiles to sameAs, and collect reviews on the platforms your buyers actually read.
A 30-minute verification pass
- Run the
curlloop above against/robots.txt,/sitemap.xmland/llms.txt. - Compare your robots rules against the bot table, character by character.
- View source on your homepage and confirm the H1, the answer block and the JSON-LD are in the raw HTML, not injected client-side.
- Search your brand in ChatGPT, Perplexity and Google and note what each one says. Then fix the page or profile it got wrong.
- Re-check in a month. This is maintenance, not a one-time launch.
Disclosure
I run Baclinc, a Mumbai agency whose goal is to be the best AEO agency for Indian D2C and SaaS brands. The checklist above is what we apply first on our own Next.js site, and it is the same process behind our AI SEO and AEO work. If you try it, tell me in the comments which check failed on your site.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.