Skip to content
SPURT.

AI search

Why ChatGPT couldn't read our website (and how to test yours)

Our old Next.js site sent AI crawlers a page with no H1 and zero words. What caused it, how to check your own site with curl, and how we fixed it.

By , Engineering

Published · 8 min read

In this article · 9
  1. What did AI crawlers see on our old site?
  2. How did one performance commit hide every page?
  3. Why didn’t we notice for more than five months?
  4. Which AI crawlers run JavaScript?
  5. How do you check what AI crawlers see on your site?
  6. Is ssr: false always a problem?
  7. How does the new site fix it?
  8. Does fixing this get you cited by ChatGPT?
  9. Sources

Short answer Our previous website wrapped every page in a component loaded with next/dynamic and ssr: false. Browsers rendered it perfectly, but the HTML our server sent had no H1 and zero words of body text. GPTBot, ClaudeBot and PerplexityBot don't run JavaScript, so they saw a blank page. The fix was to render content on the server.

We found this in September 2026 while auditing our own visibility in AI search before rebuilding this site. It's an awkward bug for a studio that builds websites to admit to. That is exactly why it's worth writing up: the site looked fine in every tool we normally check. The wider playbook is in our guide to getting your business mentioned by ChatGPT, Gemini and Perplexity.

What did AI crawlers see on our old site?

On 29 September 2026 we fetched three pages from www.spurtstudios.in with GPTBot's user agent and counted the words inside <body> after stripping scripts and templates. Then we loaded the same pages in headless Chrome, let the JavaScript run, scrolled to the bottom and counted again.

PageHTML sentWords in raw HTMLH1 in raw HTMLWords after JavaScript runs
Home (/)27 KB0NoneAbout 340
Blog post (/blogs/nextjs-app-router-production)28 KB0NoneAbout 370, with an H1
Services (/services)31 KB0NoneAbout 380, with an H1

The only readable things in the raw HTML were the <title>, the meta description and our JSON-LD. The body was this:

html
<body class="…">
  <div hidden=""><!--$--><!--/$--></div>
  <!--$!--><template data-dgst="BAILOUT_TO_CLIENT_SIDE_RENDERING"></template><!--/$-->
  <script src="/_next/static/chunks/….js" async=""></script>
  …

The article text wasn't even tucked into the HTML as data. Each blog post's body lived in a client component, so the words existed only inside a JavaScript bundle.

Our robots.txt explicitly allowed GPTBot, ClaudeBot and PerplexityBot. They were welcome. They walked in and found an empty room.

How did one performance commit hide every page?

On 10 April 2026 we shipped a commit titled "perf: optimize client-side performance for better Lighthouse scores". Most of it was sensible: lazy-loading below-the-fold sections, tree-shaking Three.js, throttling a scroll listener. It also moved our smooth-scroll provider and custom cursor into this wrapper:

tsx
'use client'
import dynamic from 'next/dynamic'

const SmoothScrolling = dynamic(
  () => import('@/components/providers/smooth-scrolling').then((m) => m.SmoothScrolling),
  { ssr: false },
)
const CustomCursor = dynamic(
  () => import('@/components/ui/custom-cursor').then((m) => m.CustomCursor),
  { ssr: false },
)

export function ClientProviders({ children }: { children: React.ReactNode }) {
  return (
    <SmoothScrolling>
      <CustomCursor />
      {children}
    </SmoothScrolling>
  )
}

The root layout then wrapped the navbar, <main> and the footer in <ClientProviders>.

ssr: false tells Next.js not to prerender that component on the server (Next.js: skipping SSR). That's harmless for a component with no children. But SmoothScrolling was the parent of the entire page. When the server skips a component, it skips everything rendered inside it. So the server sent an empty fallback and a marker that means "finish this in the browser". The navbar, every heading, every paragraph and the footer existed only after JavaScript ran.

The intent was reasonable. Lenis, the smooth-scroll library, only works in a browser. The mistake was making a browser-only wrapper when we needed a browser-only sibling.

Why didn't we notice for more than five months?

Because every tool we normally use runs JavaScript.

  • Browsers render the page, so it looked perfect.
  • Lighthouse runs inside Chrome. On 29 September it gave the old home page an SEO score of 100 in all three mobile runs.
  • Googlebot renders pages in headless Chromium "once Google's resources allow" (Google: JavaScript SEO basics), so our pages still appeared in Google.
  • Chrome DevTools shows the rendered DOM in its Elements panel, not what the server sent.

The one check that would have caught it is reading the raw HTML. Almost nobody does that by habit.

Which AI crawlers run JavaScript?

Vercel and MERJ analysed crawler traffic across Vercel's network and published the results in December 2024 (Vercel: The rise of the AI crawler). None of the major AI crawlers they tested rendered JavaScript, except Google's and Apple's. GPTBot and ClaudeBot did download JavaScript files (11.5% and 23.84% of their requests respectively) but never executed them.

CrawlerCompanyWhat it's forRuns JavaScript?
GPTBotOpenAICollecting training data (OpenAI crawler docs)No
OAI-SearchBotOpenAIShowing sites in ChatGPT searchNo
ChatGPT-UserOpenAIFetching a page when a user asksNo
ClaudeBotAnthropicCollecting training data (Anthropic crawler docs)No
Claude-SearchBot, Claude-UserAnthropicSearch quality; user-triggered fetchesNot tested in the study; assume no
PerplexityBotPerplexityPerplexity's search index (Perplexity crawler docs)No
GooglebotGoogleSearch, and the infrastructure behind GeminiYes
ApplebotAppleApple's search featuresYes

The study is a snapshot from late 2024, and crawlers change. The safe assumption hasn't: if your content isn't in the HTML, don't expect an AI system to quote it. Google says server-side or pre-rendering is still a great idea because "not all bots can run JavaScript".

How do you check what AI crawlers see on your site?

You need a terminal and five minutes. Replace the URL with your own.

1. Fetch the page as GPTBot:

bash
UA='Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; GPTBot/1.4; +https://openai.com/gptbot'
curl -sL -A "$UA" https://www.example.in/ -o page.html

2. Look for an H1 and the Next.js bailout marker:

bash
grep -c '<h1' page.html
grep -c 'BAILOUT_TO_CLIENT_SIDE_RENDERING' page.html

3. Count the words a crawler can read:

bash
python3 - page.html <<'EOF'
import html, re, sys
s = open(sys.argv[1], encoding='utf-8').read()
s = re.sub(r'(?is)<(script|style|template|noscript)\b.*?</\1>', ' ', s)
body = re.search(r'(?is)<body[^>]*>(.*)</body>', s)
text = html.unescape(re.sub(r'<[^>]+>', ' ', body.group(1) if body else ''))
print(len(text.split()), 'words in raw HTML')
EOF

On our old home page this prints 0, 1 and 0 words. On FlyHigh Pre School, a Next.js site we built earlier this year, the same three commands print 1, 0 and 1092 words. If your raw count is near zero while the page is full of text in a browser, you have the problem we had.

Then check three things curl can't show you:

  • Robots rules. Allow the bots you want. OpenAI says sites that opt out of OAI-SearchBot won't be shown in ChatGPT search answers.
  • Firewalls. A CDN's bot protection can return 403 to crawlers even when robots.txt welcomes them. A user-agent test from your laptop won't reproduce rules based on IP address, so your server logs are the real record. Look for the crawler names and the status codes they received.
  • Links. Navigation must be real <a href> elements in the HTML. A button that routes with JavaScript gives a crawler nowhere to go next.

Is ssr: false always a problem?

No. What matters is what it wraps.

This site still has two ssr: false imports: the particle canvas and an atmosphere effect in the home page hero. Fetch the home page from our preview deployment and you'll find a bailout marker, but also an H1 and 634 words of copy. The client-only part is a decorative canvas with no text in it.

Use ssr: false for canvas and WebGL, widgets that touch window as soon as they load, and third-party embeds. Never use it for providers, layouts or anything that takes children. For browser-only side effects such as smooth scrolling, render a component that returns null, does its work in useEffect, and sits beside <main> rather than around it.

A related trap: on a prerendered route, useSearchParams makes the client component tree up to the nearest <Suspense> boundary render in the browser (Next.js: useSearchParams). It's the same symptom with a smaller blast radius. Keep a Suspense boundary tight around the component that reads the query string.

How does the new site fix it?

  • Server Components by default. Pages, service pages and case studies render on the server. The interactive pieces are small client components at the edges of the tree.
  • Every content route is generated at build time. Dynamic routes use generateStaticParams with dynamicParams = false, and generateMetadata gives each page its own title and description. The HTML exists before anyone asks for it.
  • Blog posts are Markdown files rendered to HTML on the server during the build. This post reached you as plain HTML.
  • Smooth scrolling is a sibling, not a parent:
tsx
// app/layout.tsx (simplified)
<body>
  <SmoothScroll /> {/* 'use client': starts Lenis in useEffect, renders null */}
  <Nav />
  <main id="main">{children}</main>
  <SiteFooter />
</body>
  • A deploy check. Before a deploy counts as done, we run the three commands above against the home page, one service page, one case study and one post. If any of them comes back without an H1, the deploy isn't finished.

Does fixing this get you cited by ChatGPT?

Not on its own. Readable HTML gets you through the door. It doesn't get you quoted.

Google's guidance for AI Overviews and AI Mode says there are no extra requirements beyond normal SEO, and asks for text-based content that crawlers can reach (Google: AI features and your website). What earns citations is being the most useful, specific page on a question, and describing your business the same way everywhere it appears. We treat server-rendered HTML as the base layer of our SEO work, not a trick.

Two related posts from the same audit: what we measured on Indian mobile networks, where the old site's client rendering also shows up as slow LCP, and what we'd do differently in the Next.js App Router.

If you want someone to run this check on your site, our web development team can run it for you.

Sources

Frequently asked questions

Does ChatGPT run JavaScript when it reads a website?

According to Vercel and MERJ's analysis of crawler traffic, OpenAI's crawlers (GPTBot, OAI-SearchBot and ChatGPT-User) download pages but don't execute JavaScript. Anything that only appears after scripts run, such as a client-rendered React page, is invisible to them. Put your headings, body copy and links in the HTML your server sends.

How can I check what AI crawlers see on my website?

Fetch the page with curl using a crawler's user agent, then read the raw HTML. Is there an H1? Is your main copy there? Are links real anchor tags? Count the words outside script tags. If the count is near zero while the page looks full in a browser, crawlers are seeing an empty page.

Does Googlebot have the same problem with JavaScript-heavy sites?

Less so. Googlebot renders pages in headless Chromium once resources allow, so Google can usually index client-rendered content, sometimes later. Google still recommends server-side rendering or pre-rendering, because it is faster for users and not all bots run JavaScript. The AI crawlers from OpenAI, Anthropic and Perplexity are among those that don't.

Is next/dynamic with ssr: false bad for SEO?

Only when it wraps content. The ssr: false option skips server rendering for that component and everything inside it. For a decorative canvas or a browser-only widget, that's fine. Wrap a layout, a provider or anything that receives children with it and the whole page disappears from the HTML, which is what happened to our old site.

If I allow GPTBot in robots.txt, will ChatGPT cite my site?

Not by itself. Allowing crawlers is necessary, not sufficient. GPTBot collects training data, while OAI-SearchBot powers ChatGPT search, so allow both if you want to appear there. The page still has to contain specific, useful content in its HTML, and your business details should match everywhere they appear online.

Start a project

Tell us what you’re building. One of the founders — not a sales team — comes back with questions, a plan and a fixed quote.