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.
| URL | Agent | Visible body text |
|---|---|---|
/ | Googlebot | ~7 KB of head, 0 characters of body |
/ | GPTBot | 0 characters |
/pricing | ClaudeBot | 0 characters |
/pricing | PerplexityBot | 0 characters |
/discover | Googlebot | 1,788 characters |
/discover | Bytespider | 0 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
- 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.
- 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. - Derived canonical, title and description from the route instead of inheriting the shell's, and added
FAQPageandSoftwareApplicationJSON-LD built from the same strings the page displays.
The same URLs, after
| URL | Before | After |
|---|---|---|
/ (GPTBot) | 0 chars | 3,927 chars |
/pricing (ClaudeBot) | 0 chars | 2,377 chars |
/discover (GPTBot) | 0 chars | 1,788 chars |
/terms (Bytespider) | 0 chars | 7,188 chars |
/privacy (bingbot) | 0 chars | 4,420 chars |
/ (Chrome, human) | SPA | SPA — 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:
- Fetch your page with
GPTBotandClaudeBot, count the body text. If it is zero, nothing else you do matters for AI visibility. - Look at what your canonical says on a subpage. If it points home, you have told Google you only have one page.
- Split your crawler list from your permission list. One decides the HTML variant, the other lives in
robots.txt. Merging them silently blocks the agents you wanted.
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.