Back to articles

How to make your Next.js site appear in ChatGPT (and any LLM)

Published on 10 min read

  • Next.js
  • SEO
  • ChatGPT
  • LLMs
  • GEO
MacBook on a wooden desk showing lines of code on the screen

Photo by Christopher Gower on Unsplash

You blocked GPTBot in robots.txt to keep your content out of training runs — and then wondered why ChatGPT Search never cites your docs. Those are different systems. OpenAI’s own crawler docs say each bot is independent: allowing OAI-SearchBot keeps you eligible for ChatGPT search answers while disallowing GPTBot opts you out of foundation-model training.

This article is a Next.js App Router playbook for Generative Engine Optimization (GEO): how answer engines discover pages, which user-agents actually matter, how to configure robots.ts and sitemaps, how to keep HTML crawlable, and what llms.txt does — and does not — guarantee.

How LLMs find your site

Treat “appearing in an LLM” as three separate pipelines:

PipelineWhat it doesTypical bots / tokens
Training crawlCollects public pages that may enter future model trainingGPTBot, ClaudeBot, Google-Extended (token), Common Crawl’s CCBot
Search / answer indexBuilds or refreshes retrieval so answers can cite your URLsOAI-SearchBot, Claude-SearchBot, PerplexityBot, classic Googlebot / Bingbot (and partners)
User-triggered fetchDownloads a specific URL because a human asked for it (or pasted a link)ChatGPT-User, Claude-User, Perplexity-User

Blocking the training bot does not automatically block the search bot. OpenAI states this explicitly for GPTBot vs OAI-SearchBot. Anthropic documents the same split for ClaudeBot, Claude-SearchBot, and Claude-User. Perplexity documents PerplexityBot for search indexing and Perplexity-User for live fetches.

ChatGPT Search can also partner with third-party search providers. OpenAI’s help center documents that rewritten queries may be sent to partners such as Bing (and others listed in that article). Independently, OpenAI recommends allowing OAI-SearchBot if you want to appear in ChatGPT search answers. Practical implication: keep search bots allowed and stay healthy in major web indexes — do not optimize for a single rumor about which partner is “really” used this month.

OpenAI: the bots that decide ChatGPT visibility

From OpenAI’s crawler overview:

OAI-SearchBot — citations in ChatGPT Search

Used to surface websites in ChatGPT’s search features. Sites opted out of OAI-SearchBot will not be shown in ChatGPT search answers, though they can still appear as plain navigational links. OpenAI recommends allowing it in robots.txt and permitting its published IP ranges. Changes can take about 24 hours to propagate.

GPTBot — training, not Search opt-out

Crawls content that may be used to train generative foundation models. Disallowing GPTBot signals that content should not be used for that training. It does not control ChatGPT Search eligibility.

ChatGPT-User — live, user-initiated fetches

Used when ChatGPT or Custom GPTs fetch a page because of a user action. OpenAI notes it is not used for automatic web crawling, not used to decide Search inclusion, and that robots.txt rules may not apply because the fetch is user-initiated. Manage Search with OAI-SearchBot; treat ChatGPT-User as a separate live-fetch channel.

OAI-AdsBot

Only visits pages submitted as ads on ChatGPT; not used to train foundation models. Relevant if you run ChatGPT ads — ignore it for organic GEO.

A common, defensible policy for content sites that want citations but not training:

Text
User-agent: OAI-SearchBot
Allow: /

User-agent: GPTBot
Disallow: /

Other answer engines (same idea, different names)

Anthropic (Claude)

Anthropic’s help center (updated April 2026) defines three bots:

  • ClaudeBot — possible contribution to model training
  • Claude-SearchBot — indexes content for search quality; disabling it may reduce visibility in search results
  • Claude-User — user-directed fetches; disabling it may reduce visibility for user-directed web search

Anthropic honors robots.txt (including non-standard Crawl-delay) and warns that IP-blocking alone is unreliable because it can prevent the bot from reading your robots.txt.

Perplexity

Perplexity’s crawler docs recommend allowing PerplexityBot so your site can appear in Perplexity search results. Perplexity-User handles user-initiated fetches and generally ignores robots.txt because a person requested the page. If you use a WAF, whitelist by user-agent + published IP JSON (perplexitybot.json / perplexity-user.json) — robots.txt alone is not enough when the edge drops the request.

Google Gemini vs Google Search

Google-Extended is a robots.txt control token, not a separate HTTP user-agent. It governs whether crawled content may be used for training future Gemini models and for grounding in Gemini Apps / Vertex AI Grounding with Google Search. Google states it does not affect inclusion or ranking in Google Search.

Important trade-off: for OpenAI you can allow search and disallow training separately. For Google, Google-Extended covers both Gemini training and Gemini grounding. Allow it if you want Gemini apps to ground on your content; disallow it if you want to opt out of those Gemini uses (Search itself stays separate via Googlebot).

Next.js: configure app/robots.ts

App Router can generate /robots.txt from a typed file. Official docs: robots.txt file convention.

Example that keeps search/citation bots allowed, optionally opts out of training, fences private routes, and advertises the sitemap:

TypeScript
// app/robots.ts
import type { MetadataRoute } from 'next'

const SITE = 'https://example.com'

export default function robots(): MetadataRoute.Robots {
  return {
    rules: [
      {
        userAgent: '*',
        allow: '/',
        disallow: ['/api/', '/admin/', '/drafts/'],
      },
      // ChatGPT Search + live fetch
      { userAgent: 'OAI-SearchBot', allow: '/' },
      { userAgent: 'ChatGPT-User', allow: '/' },
      // Training opt-out (optional — remove this rule to allow training)
      { userAgent: 'GPTBot', disallow: '/' },
      // Claude
      { userAgent: 'Claude-SearchBot', allow: '/' },
      { userAgent: 'Claude-User', allow: '/' },
      { userAgent: 'ClaudeBot', disallow: '/' },
      // Perplexity
      { userAgent: 'PerplexityBot', allow: '/' },
      { userAgent: 'Perplexity-User', allow: '/' },
      // Gemini grounding/training token (allow if you want Gemini apps to use you)
      { userAgent: 'Google-Extended', allow: '/' },
    ],
    sitemap: `${SITE}/sitemap.xml`,
    host: SITE,
  }
}

After deploy, open https://your-domain/robots.txt and confirm the groups look right. Spoofed user-agents exist — for verification, OpenAI and Perplexity publish IP range JSON files; Anthropic currently points publishers at robots.txt rather than relying on IP blocks.

Sitemap, Bing, Google, and freshness

Crawlers need URLs to discover. Next.js can generate /sitemap.xml from app/sitemap.ts (docs):

TypeScript
// app/sitemap.ts
import type { MetadataRoute } from 'next'

export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
  const posts = await getPublishedPosts() // your data layer

  return [
    { url: 'https://example.com', lastModified: new Date(), priority: 1 },
    ...posts.map((p) => ({
      url: `https://example.com/blog/${p.slug}`,
      lastModified: p.updatedAt ?? p.publishedAt,
      changeFrequency: 'monthly' as const,
      priority: 0.7,
    })),
  ]
}

Then:

  1. Google Search Console — verify the property, submit the sitemap, fix crawl errors.
  2. Bing Webmaster Tools — verify (you can often import from GSC), submit the same sitemap. Microsoft’s February 2026 AI Performance preview in Bing Webmaster Tools reports citations across Copilot, Bing AI summaries, and select partner integrations — useful GEO telemetry for Microsoft surfaces; do not treat it as a complete ChatGPT citation dashboard unless Microsoft says so.
  3. IndexNow — ping participating engines (Bing, Yandex, and others listed on the site) when URLs are added, updated, or deleted so fresh content is prioritized sooner than passive crawl alone.

If ChatGPT Search partners with Bing for some queries, a healthy Bing index is still cheap insurance. A healthy Google index still matters for Google Search, AI Overviews / AI Mode, and anything that grounds on Google’s index.

Make the HTML worth crawling (Next.js-specific)

Answer engines and classic crawlers are more reliable when the important prose is in the first HTML response. App Router Server Components and SSR help; shipping an empty shell that only fills after client JavaScript is a classic way to look invisible.

Practical checklist for Next.js:

  • Prefer Server Components (or SSR) for article bodies, docs, and product copy.
  • Put real <title>, meta description, and Open Graph tags via the Metadata API — they travel with the document.
  • Avoid gating the main answer behind client-only fetches, infinite scroll without crawlable URLs, or auth walls for content you want cited.
  • Keep canonical URLs stable; use alternates.languages in the sitemap when you ship locales.
  • Return fast, stable 200 responses for public pages — timeouts and soft 404s waste crawl budget.

Structured data (JSON-LD for Article, FAQPage, Organization, etc.) does not replace good prose, but clear headings, short definitional paragraphs, tables, and FAQ sections match how Bing’s own GEO guidance describes content that is easier to cite accurately.

Content shape that answer engines can quote

Technical access is necessary but not sufficient. Pages that get cited tend to:

  • Answer the query early in plain language (then go deep)
  • Use descriptive ## / ### headings that match how people ask questions
  • Separate facts from opinion; link primary sources
  • Stay updated — stale version numbers get skipped or contradicted
  • Avoid thin listicles that every other site already paraphrased

You do not need a new CMS. You need pages that are the best extractable answer for a specific intent.

llms.txt: useful map, not a ranking switch

Jeremy Howard’s llms.txt proposal suggests a Markdown file at /llms.txt: site name as # heading, a short > summary, then ## sections with curated absolute links. Optional companion files (for example full concatenated context) exist in the ecosystem. Docs platforms (and many agent workflows) already use this pattern.

What it is not: a formal standard enforced by OpenAI, Google, or Anthropic for citation ranking. It does not replace robots.txt. It cannot block crawlers. Treat it as a curated table of contents for agents and humans who fetch /llms.txt on demand — especially documentation sites — not as a guaranteed ChatGPT ranking lever.

In Next.js you can start with public/llms.txt, or generate it from a Route Handler:

TypeScript
// app/llms.txt/route.ts
export function GET() {
  const body = `# Acme Docs
> Official documentation for the Acme API and SDKs.

## Docs
- [Quick start](https://example.com/docs/quickstart.md): Install and make your first request
- [Auth](https://example.com/docs/auth.md): API keys and OAuth

## Optional
- [Changelog](https://example.com/changelog): Release history
`

  return new Response(body, {
    headers: {
      'Content-Type': 'text/plain; charset=utf-8',
      'Cache-Control': 'public, max-age=3600',
    },
  })
}

If you also serve Markdown mirrors of key pages (the proposal’s .md suffix idea), agents get cleaner context than parsing your marketing HTML.

Common mistakes

  1. Disallowing GPTBot and assuming you left ChatGPT Search — you need OAI-SearchBot allowed for Search answers.
  2. Correct robots.txt, hostile WAF — Cloudflare / AWS WAF “block AI bots” rules can drop search crawlers before they read your allow rules. Whitelist by user-agent and published IPs where vendors provide them.
  3. Client-only content — if curl does not show the answer text, many crawlers will not either.
  4. No sitemap / never submitted to Bing or Google — discovery stalls.
  5. Treating llms.txt as access control — it guides; it does not enforce.
  6. Blocking Google-Extended while expecting Gemini grounding — that token covers training and Gemini grounding, not Search ranking.
  7. Expecting overnight miracles — OpenAI notes ~24h for Search robots adjustments; indexes and reputation still take time and quality.

When this matters (and when it does not)

Invest in GEO when you publish public expertise (docs, tutorials, comparisons, research) and want referral traffic or brand citation from ChatGPT, Claude, Perplexity, Copilot, or Gemini.

De-prioritize (or fully opt out) when the product is private, paywalled, legally sensitive, or you deliberately do not want model/training or answer-engine reuse — then disallow the relevant bots and accept lower AI visibility.

FAQ

Does blocking GPTBot hide me from ChatGPT?

No. Per OpenAI, Search visibility is governed by OAI-SearchBot. GPTBot is the training-oriented crawler. You can disallow GPTBot and still allow OAI-SearchBot.

Is Bing enough to appear in ChatGPT?

OpenAI documents third-party search partners (including Bing) and its own OAI-SearchBot. Do both: allow OAI-SearchBot and keep a healthy presence in major indexes. Do not rely on a single secondary blog’s claim about exclusive Bing or Google dependency.

Will llms.txt make ChatGPT cite me?

There is no public commitment from major AI labs that llms.txt controls ChatGPT citation ranking. It is still worth shipping for docs and agent UX. Citations still depend on crawl access, indexability, and content quality.

Should I allow every AI bot?

Not automatically. Decide per pipeline: search/citation vs training vs user fetch. Many content sites allow search bots, allow or disallow training consciously, and keep sensitive paths disallowed for everyone.

Does App Router hurt SEO or AI visibility?

No — Server Components and the Metadata / sitemap / robots file conventions are well suited to crawlable HTML. Problems come from client-only rendering patterns, not from App Router itself.

Conclusion

To show up in ChatGPT Search and other LLM answers: allow the search crawlers, do not let your WAF undo robots.txt, ship crawlable HTML from Next.js, submit sitemaps (and IndexNow where it helps), and write pages that answer specific questions clearly. Optionally add llms.txt as a curated map. Optionally disallow training bots if that is your policy — without confusing them for search bots.

Ship the OAI-SearchBot allow rule this week if it is missing. Everything else compounds on top of being fetchable.

References

  1. Overview of OpenAI Crawlers — OpenAI Developers (accessed Aug 2026)
  2. ChatGPT Search — OpenAI Help Center
  3. Does Anthropic crawl data from the web… — Anthropic / Claude Help Center (Apr 2026)
  4. Perplexity Crawlers — Perplexity Docs
  5. Google’s common crawlers (incl. Google-Extended) — Google for Developers
  6. The /llms.txt file — Jeremy Howard / Answer.AI proposal
  7. Next.js robots.txt — Next.js Docs
  8. Next.js sitemap — Next.js Docs
  9. Introducing AI Performance in Bing Webmaster Tools — Bing Webmaster Blog (Feb 2026)
  10. IndexNow — IndexNow protocol
  11. OAI-SearchBot IP ranges — OpenAI
  12. GPTBot IP ranges — OpenAI

Comments