AI search8 min read
Can AI crawlers read your React site?
Most AI crawlers do not run JavaScript. How to check what they see on a client-rendered site, and the trade-offs of pre-rendering, SSG and SSR.
By the analyser.dev team
Open your site, right-click, choose View page source, and search for the first sentence of your homepage. If you built the site as a client-side React app, there is a fair chance the sentence isn't there. What you'll find instead is something like this:
<body>
<div id="root"></div>
<script type="module" src="/assets/index-4f9a1c.js"></script>
</body>
Browsers don't mind. They download the script, run it, and the page appears. Google doesn't mind much either, because Googlebot renders JavaScript. But a growing share of the people who might find you are now asking ChatGPT, Claude or Perplexity instead of typing into a search box, and the crawlers behind those products mostly read the HTML as it arrives. For a client-rendered page, that HTML is an empty div.
This piece covers which crawlers run JavaScript and which don't, how to check what they actually receive from your site, and the fixes, with their costs.
Which crawlers render JavaScript?
None of the AI companies publish detailed documentation of their crawlers' rendering behaviour, so most of what we know comes from people watching server logs. The most cited analysis is a late-2024 study by Vercel and MERJ, which looked at hundreds of millions of crawler requests across Vercel's network. Its findings, roughly:
- OpenAI's and Anthropic's crawlers fetched JavaScript files but did not execute them. GPTBot and ClaudeBot requested .js files, possibly to use as training text, but there was no sign of them rendering pages.
- The same was true of the other AI crawlers studied, including those from Perplexity, Meta and ByteDance.
- Google's crawling, which also feeds Gemini, renders JavaScript, as does Applebot, which uses a browser-based crawler.
Treat this as a snapshot, not a law of nature. Crawlers change, the study is from a specific period, and it can't tell you how the user-triggered fetchers (ChatGPT-User, Claude-User, Perplexity-User), which load a page when someone pastes a link into a chat, behave in every case. But the practical conclusion has held up in every log analysis we've seen since: if your content only exists after JavaScript runs, assume most AI systems won't see it.
Bing is a partial exception worth knowing about. Microsoft says Bingbot can render JavaScript, and Copilot draws on the Bing index, so client-rendered pages may get through there. Microsoft is less specific than Google about how consistently that happens, so don't rely on it.
Why it matters more for AI than for Google
With Google, client-side rendering is a speed and reliability tax: rendering is queued separately from crawling, and things can go wrong in between, but the content usually gets indexed eventually. With a crawler that doesn't render at all, there is no eventually. The page is indexed as whatever the HTML says, which for a client-rendered app is the <title>, maybe a meta description, and nothing else. An assistant asked "what does this company do?" has nothing to quote, so it quotes someone else: a directory listing, a review site, or a competitor who explains you better than you do.
The same applies to anything injected client-side: JSON-LD added by a tag manager, Open Graph tags set by a React head library after load, FAQ answers fetched from a CMS in the browser. If a crawler doesn't run scripts, none of it exists.
How to check what crawlers receive
You don't need special tools for a first look.
- View source, not Inspect. DevTools' Elements panel shows the DOM after JavaScript has run. View source (or
Ctrl/Cmd+U) shows the HTML the server sent, which is what a non-rendering crawler gets. - Turn JavaScript off. In Chrome DevTools, open the command menu (
Ctrl/Cmd+Shift+P), type "Disable JavaScript", and reload. What you see is close to what GPTBot sees, minus the styling. - Fetch it the way a crawler would. From a terminal:
A count of zero means the text isn't in the response. Running it with the crawler's user agent also tells you whether your CDN treats that agent differently, which is a separate and surprisingly common problem.curl -s -A "Mozilla/5.0 (compatible; GPTBot/1.3; +https://openai.com/gptbot)" \ https://example.com/ | grep -c "your headline text"
analyser.dev does the comparison for you: it fetches the raw HTML, renders the page in Chromium, and reports what share of the visible text and how many headings exist without JavaScript. Below 40% is a failure (most of the page is invisible to non-rendering crawlers), 40–75% is a warning, and above that you're fine. It also checks the AI user agents separately, so you can tell a rendering problem from a firewall problem.
The fixes, and what they cost
The goal is simple to state: the meaningful content of every public page should be in the HTML response. There are four ways to get there.
1. Static generation (pre-rendering at build time)
Render each route to an HTML file when you build, then serve the files. The browser still loads your JavaScript and the page can become interactive (hydrate), but the content is already there. Astro, Next.js static export, React Router's pre-rendering, Gatsby, and plain Vite with a small pre-render script all do this.
Good for: marketing pages, docs, blogs, pricing, anything where content changes when you deploy. It's the cheapest option to run, because static files are fast and cache perfectly.
Costs: build times grow with page count, content that changes between deploys needs a rebuild or incremental regeneration, and you have to make sure components don't touch window during the build. Hydration mismatches, where the server HTML and first client render differ, are the classic bug.
2. Server-side rendering
Render HTML per request on a server (Next.js, Remix/React Router framework mode, Nuxt, SvelteKit). Content is always current and personalisable.
Good for: large catalogues, frequently changing listings, pages that depend on the request.
Costs: you now operate a server or edge runtime, with its latency, scaling and failure modes. A slow API call now slows your HTML response (time to first byte) instead of a loading spinner. Caching rendered pages at the CDN recovers most of the speed.
3. Pre-rendering only for bots (dynamic rendering)
Detect crawler user agents and serve them a headless-browser snapshot, while humans get the client-side app. It works and requires no app changes, which is why it's popular for legacy SPAs. Google now describes it as a workaround rather than a recommended setup. You maintain two versions of every page, the bot list needs updating as new crawlers appear, and snapshots go stale. Consider it a bridge, not a destination.
4. Put the essentials in the shell
If none of the above is possible soon, at least make the static index.html carry the basics: a real title and description, Open Graph tags, Organization JSON-LD, and a short <noscript> or visually hidden paragraph stating plainly what the product is. It won't make your pages quotable in detail, but it gives assistants a correct one-line answer about you instead of nothing.
What doesn't need fixing
Pages behind a login (dashboards, settings, the app itself) don't need any of this. Crawlers can't see them anyway, and client-side rendering is a perfectly good choice there. The usual healthy split is a pre-rendered public site (homepage, product pages, pricing, docs, blog) and a client-rendered app on its own subdomain.
Also, don't panic about interactive widgets. A pricing calculator or a demo that needs JavaScript is fine, as long as the text around it, the plan names, what's included and the prices, is in the HTML.
A five-minute checklist
- View source on your homepage, pricing page and one blog post. Is the main text there?
- Is the
<title>, meta description and canonical in the source, not only in the rendered DOM? - Is your JSON-LD in the source, or injected by a tag manager?
- Does
curlwith an AI crawler's user agent get the same response as your browser, or a 403 or a challenge page? - Does the first paragraph say, in plain words, what you are and who it's for?
If the answers are mostly yes, AI crawlers can read your site, and the remaining question is whether they're allowed to. That's covered in AI crawlers in robots.txt: search bots vs training bots.