minibuildai
ENGINEERING NOTE

What AI Crawlers Actually See When Your App Is a React SPA

· 956 words · about 4 min read · minibuildai engineering

We build an AI app builder, and our own marketing site was a React single-page app. That made us the perfect test case for a question most AI products never check: when an AI crawler fetches your page, does it get content or an empty <div id="root">?

Why this stopped being a Google question

Googlebot has executed JavaScript at scale for years. The crawlers behind AI answers have not. When someone asks ChatGPT, Claude or Perplexity about a product category, the retrieval step fetches pages and reads what comes back in the first HTML response. If the page is client-side rendered, that response contains a script tag and nothing else.

The practical result: a page can rank in Google and be completely invisible to the systems that increasingly decide what people hear about.

The test

We requested our own URLs with each crawler's real User-Agent string, then stripped the HTML and counted the visible body text. Same URL, same server, different agents.

URLAgentVisible body text
/Googlebot~7 KB of head, 0 characters of body
/GPTBot0 characters
/pricingClaudeBot0 characters
/pricingPerplexityBot0 characters
/discoverGooglebot1,788 characters
/discoverBytespider0 characters

The /discover row is the interesting one: it had a server-rendered variant that was only served when our crawler regex matched the User-Agent. Googlebot matched. The AI crawlers did not, because they were not in the regex at all.

Three bugs, not one

The naive explanation is "we were client-side rendered, so we server-rendered it". That is one of three separate faults, and fixing only that would have left two running.

1. The body was empty for everyone

Every route served the same index.html, whose body was <div id="root"></div>. Googlebot could render it. Nobody else could. Fixing this means rendering real HTML for the pages that carry search value — not the whole app, just the public ones.

2. Our crawler allowlist omitted every AI crawler

We had a regex that switched a request to the server-rendered path when the User-Agent looked like a crawler. It contained googlebot, bingbot, baiduspider, the social unfurlers — and no gptbot, no claudebot, no perplexitybot.

Which is a strange kind of irony: we had published an llms.txt specifically to help AI crawlers, while the same codebase served them an empty page.

The fix is one regex, but the rule behind it matters: that list decides which HTML variant an agent gets. It is not a permission list. Whether a bot may crawl is governed by robots.txt, and conflating the two is how you end up blocking agents you meant to welcome.

3. The canonical tag was hard-coded to the homepage

The SPA shell carried <link rel="canonical" href="https://example.com/">. So every route — /pricing, /discover, all of them — told crawlers "the real version of this page is the homepage". Search Console eventually reported it back to us as a canonical mismatch on /discover: Google had selected /discover, the page had declared /.

If a page declares another URL as canonical, it is asking not to be indexed on its own. Three hundred pages doing that is a site telling Google it has one page.

What we changed

  1. Server-rendered the pages that earn search traffic. Homepage, pricing, terms, privacy, the comparison pages, the help chapters, the blog. The product itself — the editor, the chat — stays client-side, because it never needed to be indexed.
  2. Extended the crawler pattern to the AI agents: gptbot, oai-searchbot, chatgpt-user, claudebot, claude-searchbot, claude-user, perplexitybot, perplexity-user, bytespider, ccbot, google-extended, amazonbot, meta-externalagent.
  3. Derived canonical, title and description from the route instead of inheriting the shell's, and added FAQPage and SoftwareApplication JSON-LD built from the same strings the page displays.

The same URLs, after

URLBeforeAfter
/ (GPTBot)0 chars3,927 chars
/pricing (ClaudeBot)0 chars2,377 chars
/discover (GPTBot)0 chars1,788 chars
/terms (Bytespider)0 chars7,188 chars
/privacy (bingbot)0 chars4,420 chars
/ (Chrome, human)SPASPA — unchanged

That last row is the constraint that shaped the whole fix: the homepage is the product entry point, so human visitors must keep getting the app. Server-rendering it for everyone would have replaced the product with a brochure.

What this did not fix

Being readable is not the same as being found. Thirty days after the fix, Search Console showed roughly 65 impressions and 2 clicks across 21 pages — and the query dimension returned zero rows, because Google hides queries below a threshold we had not reached.

So: server rendering is necessary, not sufficient. It removes one reason for invisibility; distribution and links remove the others. Anyone who tells you SSR alone will grow a new site's traffic is selling something.

If you are shipping an AI-built app

The same failure will happen to every app your users generate, and to your own site. Three checks, in order:

Build your first app free — no card See pricing

Written by the minibuildai engineering team. Numbers come from curl requests to minibuildai.com with each agent's User-Agent, counting visible body text after stripping tags and scripts. The Search Console figures are from the 30 days ending 2026-11-27.