AI search

Does Google index a React app that renders in the browser?

Short answer

Usually yes, but not instantly and not for every crawler. Google's documentation says Googlebot queues pages with a 200 status for rendering, that the wait can be longer than a few seconds, and that not all bots can run JavaScript. Server-side or prerendering is still recommended, and a Vite project can prerender every route to static HTML with a short Node script and no Next.js.

#What Google documents

  • Googlebot queues all pages with a 200 HTTP status for rendering.
  • A page may stay in that queue for a few seconds, but it can take longer.
  • When resources allow, a headless Chromium renders the page and runs the JavaScript.
  • Rendering can be skipped for some pages, for example when a noindex tag is present.
  • Server-side or prerendering is still a great idea because it makes the site faster for users and crawlers, and not all bots can run JavaScript.

Treat anything other than Googlebot as a client that may read only the raw HTTP response. If the content is in that response, every client sees it.

#The Vite prerender method

This site is a React 19 and Vite app that ships every page as complete HTML. The build has three steps:

package.json scripts
"build:client": "vite build",
"build:server": "vite build --ssr src/entry-server.jsx --outDir dist-ssr",
"prerender": "node scripts/prerender.mjs",
"build": "npm run build:client && npm run build:server && npm run prerender"
  1. The client build writes the browser bundle and an index.html template.
  2. The server build bundles an entry file that exports a render function using the router's static mode and renderToString.
  3. A Node script imports that bundle, loops over the route list, fills two placeholders in the template with the head tags and the rendered markup, and writes each route to its own folder as index.html.
  4. In the browser, hydrateRoot attaches to the existing markup instead of replacing it.

The same script writes the sitemap, the RSS feed and llms.txt from the same data, so nothing drifts. The full walkthrough is in Prerender a React 19 and Vite Site for SEO.

#Hosting details that catch people

  • Each route becomes a folder with an index.html, so the host redirects the slashless URL to the slashed one. Use the slashed form as the canonical URL everywhere.
  • Do not rewrite unknown paths to index.html. That returns a 200 status for pages that do not exist, which creates soft 404s. Serve a real 404 page instead.
  • The .htaccess file is a dotfile that file managers hide, and forgetting to upload it silently drops redirects and headers.

#Check the output

Fetch a page with a plain HTTP client, not a browser, and confirm the headline, body text, canonical tag and JSON-LD are in the response:

Verify the raw response
curl -s https://example.com/page/ | grep -c 'application/ld+json'
curl -s https://example.com/page/ | grep '<link rel="canonical"'

If both commands return content, every crawler that reads the raw response sees what you see. For what else matters for AI search visibility, see Do I need llms.txt or special markup to appear in Google AI Overviews?.

Sources

  1. Google Search Central, JavaScript SEO basicsAccessed 2026-10-28.

Read the full write-up

More questions

Do I need llms.txt or special markup to appear in Google AI Overviews?

No. Google's documentation says a page only needs to be indexed and eligible to show with a snippet to appear in AI Overviews and AI Mode, with no...

Read the answer

Who is Dinesh Solanki?

Dinesh Solanki is a Forward Deployed Engineer and Generative AI specialist based in Bengaluru, India. Since July 2025 Dinesh has built Opaeron, a...

Read the answer

Have a question that is not answered here?

Ask me directly