# Make a React app readable to ChatGPT and Google

> A client-rendered React or Vite app sends crawlers an empty div. See what they get, then pick a fix: prerendering, SSG or a move to SSR.

Canonical: https://pagerender.io/ai-crawlers/react  
Updated: 2026-11-11

A Vite or Create React App build sends a div and a script. ChatGPT, Claude and Perplexity keep that div. Google can render later. The HTML you want indexed has to exist before the script runs.

[Check what AI crawlers see](https://pagerender.io/crawler-check/)

## What the crawler actually receives

Open the page, then view the source, not the Elements panel. The Elements panel is the page after JavaScript. Source is the response. On a client-rendered React app that response is a document, a root div, and a script pointing at your bundle. The product names, the prices and the article are not in it yet.

Vercel and MERJ measured GPTBot, OAI-SearchBot, ChatGPT-User, ClaudeBot and PerplexityBot fetching pages without executing JavaScript. They did download script files. A request for main.js in the logs is not the bot building your tree. Googlebot is the exception in that study, because Gemini and Google Search render JavaScript in a later wave. The first response is still the one you should be able to read.

## Vite and Create React App

Vite's React template and Create React App both ship a client bundle. There is no server step that walks the component tree unless you add one. React Router in the browser does not create a URL a crawler can request unless you also render real anchors. A button with an onClick and no href is invisible as a link.

The crawler check counts words in that first HTML and flags an app shell when the count is under 60 and the document has a root, app, or react marker. Run it on a product URL, not only the homepage. Homepages are often the one route someone filled in by hand.

## Three fixes

Static generation walks the routes at build time and writes an HTML file per URL. It fits pages that are the same for every visitor: docs, marketing, a catalog that can be rebuilt on publish. It does not fit a page whose content depends on the person looking at it, unless you render a useful public version and load the private bits after.

Server rendering runs the tree on the request. Next.js, Remix and other React frameworks do this. Moving a Vite app there is a rewrite, not a setting. It is the right project when you are already replacing the router and the data loading. Google's dynamic rendering note says server-side rendering, static rendering or hydration is the long-term fix.

Prerendering leaves the Vite app alone and renders it for crawler user agents. The visitor still downloads the bundle. GPTBot, ClaudeBot and PerplexityBot get the HTML after the app has drawn. Pagerender does that without a rebuild of the app. Try it free for a week on the URL the checker called empty, and compare the word count before and after.

## What not to confuse with a fix

A sitemap does not put text into an empty div. A meta description does not replace the body. JSON-LD that describes a product the HTML does not contain is a hint, and a crawler that only reads the document still needs the words. Rendertron is the old headless Chrome server for this job, and the repository is archived.

If the checker shows a 401, 403, 429 or 503 for GPTBot, the template is not the first bug. The host challenged the bot. Fix the firewall, then look at the HTML. Both can be wrong at once. The checker shows them on separate rows so you can tell.

## Links, data, and the head

A React router link that renders an anchor is a URL. A div with an onClick that pushes history is not. Crawlers follow href. The checker counts anchors whose href is a real URL, and it counts click-only controls separately. If the word count is fine and the link count is tiny, the text is there and the site still has no path through it.

Data loaded in useEffect, or in a client query that starts after mount, is not in the HTML. The component can render a skeleton on the server and fill the list later. That skeleton is what GPTBot keeps. Move the public data into the render that produces the HTML, or prerender after the data has loaded.

The head is the easy part people fix first. A title and a description in index.html show up in the check even when the body is empty. Do not stop when the title row says found. Read the word count. The body is the page.

Next.js is a different React. In the App Router, pages are Server Components unless you opt into a client boundary, and a client component is still prerendered to HTML on the server. "use client" does not mean the document is empty. The empty cases are narrower: next/dynamic with ssr set to false, data loaded in useEffect or a client-only query, and a static export whose data is fetched in the browser. If you are on Next and the source already contains the paragraph, you do not have this bug. Check before you migrate off Next to "fix SEO".

A static export (output export) writes HTML files, and those files contain whatever the server pass produced at build. If that pass rendered a skeleton because the data lived in the browser, the file is a skeleton forever. Prerendering a Vite app is the cousin of that: run the app once, save the HTML, serve the file to bots. The difference is who runs the browser. You can do it at build time, or a service can do it on the request for crawler user agents.

When you do move a Vite app, move the public routes first. A marketing site and a logged-in dashboard do not need the same render. The dashboard can stay a client bundle behind a noindex. The pages a crawler should cite are the ones whose text has to be in the file. That split is smaller than rewriting every screen, and it is the split Next and other frameworks already encourage: server for the document, client for the interaction.

After either change, run the same URL through the checker again. You want the word count to jump because the body is in the HTML, and the bot rows to stay allowed. A render that is then blocked in robots.txt is a page you built and then hid. Pagerender's free week is the version of this test on your own domain, with the rendered HTML served to the crawler instead of the shell. Keep a note of the before and after word counts. That pair is the only number that matters for this bug, and it comes from your URL, not from a benchmark.

## Questions

### Does React 19 change what crawlers see?

Not by itself. A client bundle is still a client bundle. Server rendering is a framework choice on top of React, not a new React default.

### Will Google index a Vite app anyway?

Googlebot can render JavaScript later. The AI crawlers in the Vercel study do not. If the words are only in the bundle, those crawlers have nothing to cite, even when Google eventually does.

[Try it free for a week](https://app.pagerender.io/signup?source=ai-crawlers-react)