How to index a React or Vite SPA on Google
A single-page app can look completely finished in your browser and still serve Google, Bing, and every AI crawler nothing but an empty <div id="root">. This is what React SEO actually comes down to — SEO with React only works once this rendering gap is fixed, and it's the same root cause behind React SPA SEO, React client-side rendering SEO, and Vite SEO problems across Lovable, Bolt.new, and other Vite/React tooling. Here's how to check for it and fix it.
Your app can look finished and still be invisible.
This is an actual pattern we catch: a polished dashboard that search engines and AI crawlers see as an empty shell.
Revenue
Signups
<!DOCTYPE html> <html> <head><title>Vite + React</title></head> <body><div id="root"></div></body> </html>0 bytes of indexed content
Completely invisible to Google, Perplexity, and ChatGPT Search — no matter how good the product is. It's one of 40+ checks in every Launch Readiness Audit. See how to check and fix it.
How to tell your app has this problem
- "site:yourapp.com" on Google returns zero or almost no results, even months after launch
- View Page Source (not Inspect Element) shows an almost-empty HTML file with a single container div
- Sharing a link in Slack, X, or LinkedIn shows no title, description, or preview image
- Google Search Console lists pages as "Discovered — currently not indexed" with no crawl errors
- AI answer engines (ChatGPT Search, Perplexity, Claude) never cite or reference your app when asked about it
Any client-rendered single-page app can have this problem
This isn't specific to one AI builder. Any app built as a client-rendered single-page app — React, Vue, or plain JavaScript, whether hand-written or generated by Lovable, Bolt, Replit, or another tool — ships one HTML file with an empty container. Content only appears after the browser downloads and runs your JavaScript bundle.
A human's browser runs that JavaScript, so the app looks complete. Googlebot can render JavaScript, but slowly and unreliably compared to reading real HTML. Most AI crawlers — the ones behind ChatGPT Search, Perplexity, and Claude — don't render JavaScript at all. They read the raw response and see nothing.
The fix is the same regardless of what built the app: ship real content in the first HTML response.
What actually fixes it
- 1. Pre-render or server-render every public, indexable route so the initial HTML response contains real, route-specific text — not just a script tag and an empty container
- 2. Add a unique <title>, meta description, canonical URL, and Open Graph tags to every route
- 3. Generate sitemap.xml listing every public route with an accurate last-modified date
- 4. Confirm robots.txt allows crawling of everything that should be indexed
- 5. Verify with a raw HTTP request, not a browser — a browser runs your JavaScript and will always look fine
Copy-paste this into Cursor, Claude, or v0 to ship the fix:
You are auditing a single-page application for search and AI-crawler visibility. Audit every public, indexable route (homepage, pricing, and any content pages) and confirm each one returns meaningful, route-specific HTML in the initial server response — not an empty container element that only fills in after JavaScript runs. For each route that fails this check: 1. Add server-side rendering or static pre-rendering so real content ships in the initial HTML response 2. Add a unique <title>, meta description, self-referencing canonical URL, and Open Graph tags 3. Generate or update sitemap.xml to include every public route with an accurate lastmod date 4. Confirm robots.txt allows crawling of all of them Report back the full list of routes you checked, which ones needed rendering changes, and what you changed on each.
curl -s https://yourapp.com | grep -i title
Bolt.new, Lovable, and Vite all hit this the same way.
The builder changes how fast you got here — not whether the fix is needed.
Vite + React (any builder)
A Vite single-page app is invisible to search engines by default.
Vite's default build ships a static index.html with an empty <div id="root">. Every crawler that doesn't execute JavaScript — and several that do, but time out first — sees a blank page with no title, no headings, and no content.
Bolt.new
Bolt.new projects need SEO prerendering added — it isn't on by default.
Bolt.new scaffolds a Vite SPA out of the box. It's fast to preview and deploy, but nothing in the default template prerenders or server-renders your routes, so the SEO prerender step has to be added deliberately before launch.
Lovable
A Lovable app can fail Google indexing with an empty div, even after a real design pass.
Lovable apps can look pixel-perfect in the builder and the browser while still shipping the same empty-shell HTML under the hood. Visual polish doesn't fix this — it's a rendering-strategy issue, not a design one.
A build step generates static HTML snapshots of each route after the fact. Cheapest retrofit for an existing SPA — good for mostly-static marketing pages.
The server renders full HTML per request, including personalized or frequently changing content. More setup, but the correct choice for anything dynamic.
Pages are built to plain HTML at deploy time. Fastest and simplest, but only fits content that doesn't change per visitor.
React SEO and Vite SEO: frequently asked questions
How SEO with React actually works, why React client-side rendering hurts SEO, and whether Vite SEO is a separate problem.
Your prototype deserves a real launch plan.
Stop guessing what comes next. Find the gaps, focus on the highest-impact fixes, and move toward customers with confidence.
Get a Launch Ready Audit48-hour turnaround. Clear priorities. No product-theater detours.