SEO for AI Search: Getting Your Site Read by ChatGPT, Claude, and Perplexity
AI crawlers don't run JavaScript, your CDN may be blocking them, and llms.txt is a bet. A practical technical-SEO checklist for being read by AI search.
By Pavle AleksicWeb Development11 min read
On this page
- Who is actually crawling you
- Your CDN might be overruling your robots.txt
- AI crawlers do not run your JavaScript
- The metadata bug hiding on almost every page
- Titles and descriptions: write for the truncation
- One host, one URL
- Structured data: identity, not decoration
- llms.txt: cheap, but a bet
- Don't skip Bing
- The checklist
- Frequently asked questions
- Should I block AI crawlers like GPTBot and ClaudeBot?
- Does blocking Google-Extended remove my site from AI Overviews?
- Do AI crawlers execute JavaScript?
- Is llms.txt worth adding?
- Does structured data help with AI search?
I recently audited my own site before relaunching it, and I expected to find nothing. It was a fresh Next.js build, every page had metadata, there was a sitemap, there was JSON-LD. The crawl came back with 44 of 69 URLs flagged. Social cards on a dozen pages showed the wrong title. The RSS link was missing from most pages. The www subdomain served a full duplicate of the site. And the 404 page told search engines that its canonical URL was the homepage.
None of that was visible in a browser. All of it was visible to a crawler. That is the whole problem with SEO in 2026: there are now two audiences reading your HTML that you never look at, classic search engines and AI systems, and the second one is far less forgiving than the first.
This is the checklist I now run on every site, split into what both audiences need and what AI crawlers specifically need.
Who is actually crawling you
"AI crawler" is not one thing. Each major vendor runs separate bots for separate jobs, and the distinction matters because you can allow one and block another.
| Vendor | Training | Search index | User-triggered fetch |
|---|---|---|---|
| OpenAI | GPTBot | OAI-SearchBot | ChatGPT-User |
| Anthropic | ClaudeBot | Claude-SearchBot | Claude-User |
| Perplexity | — | PerplexityBot | Perplexity-User |
Google-Extended (a robots token, not a crawler) | Googlebot | — | |
| Apple | Applebot-Extended (a robots token) | Applebot | — |
Two things trip people up here. First, Google-Extended does not control whether you appear in Google Search or AI Overviews. Those are fed by Googlebot's index. Blocking Google-Extended only opts you out of your content being used for Gemini models. Second, the search-index bots are the ones that decide whether an AI answer can cite and link to you. If you are a freelancer, a consultancy, or anyone who wants to be recommended by an assistant, blocking OAI-SearchBot or Claude-SearchBot is blocking a referral channel.
My default for a portfolio or business site is simple: allow everything. Your content is marketing; you want it read.
// app/robots.ts
import type { MetadataRoute } from "next";
export default function robots(): MetadataRoute.Robots {
return {
rules: { userAgent: "*", allow: "/" },
sitemap: "https://example.com/sitemap.xml",
};
}If you do want to opt out of training while staying citable, list the training bots explicitly and leave the search bots allowed. Just be aware that robots.txt is a request, not an enforcement mechanism.
Your CDN might be overruling your robots.txt
This is the one that bites the most people, and it has nothing to do with your code. Since July 2025, Cloudflare blocks known AI crawlers by default on newly added domains, and it can also inject its own managed rules into your robots.txt. Your repository says Allow: /. Your edge says 403.
You cannot fully verify this with curl, because Cloudflare identifies verified bots by IP range, not just user agent. A request from your laptop with -A "GPTBot" proves your origin is fine, nothing more. Check the dashboard (AI Crawl Control, or the "Block AI bots" toggle on older plans) and read the robots.txt that is actually served in production, not the one in your repo:
curl -s https://example.com/robots.txtIf it contains lines you did not write, your CDN is editing it.
AI crawlers do not run your JavaScript
Googlebot renders JavaScript. Most AI crawlers do not. Vercel and MERJ analyzed crawler traffic at scale and found that GPTBot, ClaudeBot, and PerplexityBot fetch JavaScript files but never execute them. Whatever is not in the initial HTML response does not exist for them.
That makes rendering strategy an SEO decision. A client-rendered page that shows a spinner and then fetches its content is an empty page to an AI crawler. The fix is to put content in the HTML: static generation or server rendering. If you are on the App Router, Server Components give you this by default, which is one more reason the Server Components mental model is worth internalizing.
The test takes ten seconds. Fetch the page the way a crawler does and search for a sentence from the middle of your content:
curl -s https://example.com/blog/some-post | grep -c "a sentence from paragraph four"Zero means crawlers that don't render JavaScript see nothing. While you are there, check that <title>, <meta name="description"> and <link rel="canonical"> are inside <head> in that raw response, not injected later.
The metadata bug hiding on almost every page
Next.js metadata merges shallowly. If your root layout defines openGraph with a siteName and locale, and a page defines its own openGraph with just a title and URL, the page's object replaces the layout's entirely. siteName is gone. The same applies to twitter and alternates.
That produced three separate bugs on my site:
- The layout set
twitter.titleto my name. Pages that setopenGraphbut nottwitterinherited it, so every shared link on X said "Pavle Aleksic" instead of the page title. - The layout set
alternates.typesfor the RSS feed. Every page that set its own canonical throughalternatessilently dropped the feed link. - The layout set
alternates.canonical: "/". Every page that didn't override it, including the 404, declared the homepage as its canonical.
The fix is to stop hand-writing metadata objects per page and build them all through one function, so a page cannot forget a field:
// lib/seo.ts
import type { Metadata } from "next";
const SITE = "https://example.com";
const BRAND = " — Example";
export function pageMetadata(opts: {
title: string;
description: string;
path: string;
image?: string;
}): Metadata {
// Only append the brand if the full title still fits in ~60 characters.
const title = (opts.title + BRAND).length <= 60 ? opts.title + BRAND : opts.title;
const image = opts.image ?? "/opengraph-image";
return {
title: { absolute: title },
description: opts.description,
alternates: {
canonical: opts.path,
types: { "application/rss+xml": `${SITE}/feed.xml` },
},
openGraph: {
title,
description: opts.description,
url: `${SITE}${opts.path}`,
siteName: "Example",
locale: "en_US",
type: "website",
images: [{ url: image, width: 1200, height: 630 }],
},
twitter: { card: "summary_large_image", title, description: opts.description, images: [image] },
};
}And remove the canonical from the root layout entirely. A canonical should be set by the page that knows its own URL, never inherited.
Titles and descriptions: write for the truncation
Google cuts titles at roughly 600 pixels, which is about 60 characters, and descriptions somewhere around 155 to 160. AI answers that cite you usually show the title too. On a technical blog the natural headline is often longer than that: my post on vector databases had a 91-character title.
Don't shorten the headline readers see. Add a separate search title in frontmatter and use it for <title> only:
title: "Choosing a Vector Database in 2026: pgvector, Pinecone, Qdrant, and When Postgres Is Enough"
seoTitle: "Choosing a Vector Database in 2026: pgvector vs Pinecone"Then audit lengths mechanically instead of by eye. A crawl script that pulls every URL from your sitemap and checks title length, description length, canonical, og:url, og:image, and H1 count takes twenty minutes to write and catches everything in this section.
One host, one URL
If www.example.com and example.com both return 200, you have two copies of every page. Canonical tags soften the damage, but a redirect removes it:
// next.config.mjs
export default {
async redirects() {
return [
{
source: "/:path*",
has: [{ type: "host", value: "www.example.com" }],
destination: "https://example.com/:path*",
permanent: true,
},
];
},
};Check the trailing slash too. /about/ should redirect to /about (or the reverse), never serve both.
Structured data: identity, not decoration
JSON-LD will not rank you by itself, and I have seen no evidence that the AI crawlers parse it specially. Its job is identity. A Person with a stable @id, a real photo, knowsAbout, and sameAs links to your GitHub and LinkedIn tells every system reading the page that this author, these profiles, and this site are one entity. That is the machine-readable version of E-E-A-T.
{
"@type": "Person",
"@id": "https://example.com/#person",
"name": "Jane Developer",
"jobTitle": "Full-Stack Developer",
"image": { "@type": "ImageObject", "url": "https://example.com/jane.jpg" },
"sameAs": ["https://github.com/jane", "https://www.linkedin.com/in/jane/"]
}Every BlogPosting then points author at that same @id instead of repeating a name string. Use a real headshot for image. A generated social card is not a photo of a person.
llms.txt: cheap, but a bet
llms.txt is a proposed standard from Jeremy Howard: a Markdown file at your site root that summarizes who you are and links to your important pages, written for language models instead of browsers. No major AI search product has confirmed that it reads the file, and Google has been openly skeptical of it.
I added one anyway, because it costs nothing when it is generated from data I already have. In Next.js it is a static route handler built from the same source as the sitemap:
// app/llms.txt/route.ts
import { getAllPosts } from "@/lib/blog";
export const dynamic = "force-static";
export function GET() {
const posts = getAllPosts()
.map((p) => `- [${p.title}](https://example.com/blog/${p.slug}): ${p.description}`)
.join("\n");
const body = `# Jane Developer — Full-Stack Developer
> Full-stack developer building SaaS platforms and AI features.
## Articles
${posts}
`;
return new Response(body, { headers: { "Content-Type": "text/markdown; charset=utf-8" } });
}Treat it like a lottery ticket that costs nothing, not like a strategy. The strategy is everything above it: content in the HTML, crawlers allowed, metadata correct.
Don't skip Bing
Many developers have never opened Bing Webmaster Tools, and that is now a mistake. ChatGPT search draws on third-party search providers, and Bing has been one of them, so Bing's index is part of how your pages reach an AI answer. Submit your sitemap there as well as in Google Search Console. Both take five minutes.
The checklist
What I check on every launch, in order of how often it is broken:
- Production robots.txt and CDN bot settings. Read what is served, not what is in the repo.
- Content in the raw HTML.
curla page and grep for body text. - Every page's metadata complete. Title, description, canonical,
og:*,twitter:*, RSS link. Build it through one helper so nothing gets dropped. - No inherited canonical in the root layout; the 404 is
noindex. - Titles ≤ ~60 characters, descriptions ≤ ~160, audited by script across the whole sitemap.
- One host.
wwwand trailing-slash variants redirect. - Person and article JSON-LD with stable
@ids, a real photo, andsameAsprofiles. - Sitemap submitted to both Google Search Console and Bing Webmaster Tools.
- llms.txt, if it is free to generate.
Then make the pages fast, because field performance still counts. Core Web Vitals and sensible HTTP caching are the other half of technical SEO, and they help every crawler and every human equally.
None of this replaces writing things worth citing. But it makes sure that when you do, every system reading the web can actually find it, read it, and know it was you.
Frequently asked questions
Should I block AI crawlers like GPTBot and ClaudeBot?
For a business, portfolio, or consultancy site, usually not. Blocking the search-index bots (OAI-SearchBot, Claude-SearchBot, PerplexityBot) removes you from AI answers that could cite and link to you. If you object to model training specifically, block only the training bots (GPTBot, ClaudeBot, Google-Extended) and keep the search bots allowed.
Does blocking Google-Extended remove my site from AI Overviews?
No. Google-Extended only controls whether your content is used for Gemini models. AI Overviews are built from Googlebot's search index, so blocking Google-Extended has no effect on whether you appear there.
Do AI crawlers execute JavaScript?
Most do not. GPTBot, ClaudeBot, and PerplexityBot fetch the raw HTML and do not run your scripts, so content that only appears after client-side rendering is invisible to them. Server rendering or static generation fixes this.
Is llms.txt worth adding?
Only if it is cheap to generate. It is a proposal, not a standard, and no major AI search product has confirmed that it reads the file. Generate it from data you already have, as a route handler, and spend your real effort on crawlability and content.
Does structured data help with AI search?
Indirectly. JSON-LD establishes who wrote the page and how it connects to your other profiles, which supports trust signals in classic search. There is no public evidence that AI crawlers parse it specially, so treat it as identity markup, not a ranking lever.
If you want a site audited or rebuilt with all of this in place, that is part of my frontend and Next.js work, or you can tell me about your project.