Guide
React SPA SEO: why AI crawlers see an empty page
Updated
A React single-page app built with Vite or a similar tool sends an almost empty HTML file: usually one <div id="root"></div> and a script. Google can render it later, but most AI crawlers read only that file, so they see an empty page. The fixes go from pre-rendering your routes at build time to moving to a framework that renders on the server.
Written by Mattéo Springmann, who makes Lumi GEO, the Chrome extension mentioned at the end. Everything below works without it. Facts checked on November 12, 2026 in React's, React Router's and Google's documentation and in Vercel's measurements (sources at the bottom).
Why a React SPA looks empty to crawlers
React's own documentation explains it: build tools like Vite, Parcel or Rsbuild "start off with a client-only, single-page app (SPA)", and other rendering patterns such as server-side rendering (SSR) or static site generation (SSG) have to be added. A single-page app "load[s] a single HTML page and dynamically updates the page".
How crawlers deal with that differs:
- Google queues pages for rendering, runs the JavaScript in a headless Chromium, then indexes the result. The page "may stay on this queue for a few seconds, but it can take longer than that".
- Most AI crawlers do not run JavaScript. Vercel and MERJ measured it in December 2024: none of the major AI crawlers rendered JavaScript.
- Link previews (Slack, LinkedIn, WhatsApp) read the HTML too, so a single set of tags in
index.htmlis all they ever see.
Google sums it up itself: server-side rendering or pre-rendering "is still a great idea because it makes your website faster for users and crawlers, and not all bots can run JavaScript".
The test: is your text in the HTML?
- Open the page in Chrome and press Ctrl+U (Cmd+Option+U on a Mac). This shows the HTML the server sent, before any script runs. Do not use "Inspect": it shows the page after scripts have run.
- Press Ctrl+F (Cmd+F) and search for a sentence from the middle of the page, not the title.
- Found: crawlers that do not run JavaScript can read it. Not found: the text only exists after JavaScript runs.
On a classic Vite + React app, the page source shows the <head> from index.html, an empty root element and script tags. Every route shows the same source, which also means every route shares one title and one description.
The fixes, ranked by effort
1. Minutes: fill in index.html
Give it a real <title>, a meta description, Open Graph tags and the site's name, and a <noscript> paragraph that says what the site is. It does not fix the content of each route, but crawlers and previews stop seeing a blank template.
2. A day or less: pre-render your routes at build time
If you use React Router in framework mode, its documentation describes a prerender option in react-router.config.ts that writes an HTML file per route at build time, and works with ssr: false for a static host:
import type { Config } from "@react-router/dev/config";
export default {
ssr: false,
prerender: true,
} satisfies Config;prerender: true covers static paths; dynamic ones such as /blog/:slug need to be listed. Routes you do not pre-render fall back to the single-page app.
3. To avoid: a different version for bots only
Google calls this "dynamic rendering" and writes that it "is a workaround and not a recommended solution, because it creates additional complexities and resource requirements".
4. Bigger: move to a framework that renders on the server
React's documentation recommends starting new apps with a framework (among them Next.js, React Router, Expo, and TanStack Start in beta). Next.js also supports a static export that needs no server. Every page then sends its own HTML, title and description.
How to check that the fix worked
Repeat the view-source test on the deployed site, on several routes: each one should show its own title and its own text. For Google, Search Console's URL Inspection shows what Googlebot rendered. For ChatGPT, the guide to checking if ChatGPT can see your website adds the robots.txt and CDN checks.
Checking it in one click (the tool I make)
Lumi GEO, the free Chrome extension I make, compares the HTML a page sends with what your browser shows, gives the share of text invisible without JavaScript, and greys it out on the page. On a pure SPA, expect most of the page to be grey: that is the problem this guide fixes. Get it on the Chrome Web Store.
Frequently asked questions
Is a React SPA bad for SEO?
Google can render it, with a delay. Most AI crawlers and link preview bots cannot, so they see an almost empty page. Pre-rendering or server rendering fixes both.
Can Google index a client-side rendered React app?
Yes. Google says it renders pages with a headless Chromium after a queue that can take a few seconds or longer, then indexes the rendered HTML.
What is the easiest way to make a React SPA readable by AI crawlers?
Pre-render your routes to HTML at build time, for example with React Router's prerender option, so every route has its own HTML file with its text in it.
Sources (checked on November 12, 2026)
- React, Creating a React App and Build a React app from scratch: frameworks recommended, SPAs from build tools, SSR and SSG.
- React Router, Pre-Rendering: the
prerenderoption, with or without a server. - Google Search Central, Understand JavaScript SEO basics, last updated March 4, 2026: the render queue and "not all bots can run JavaScript".
- Google Search Central, Dynamic rendering as a workaround, last updated December 10, 2025.
- Vercel, The rise of the AI crawler, December 17, 2024: JavaScript rendering by AI crawlers, measured with MERJ.