← All posts

React Apps Not Indexed: Hydration, Rendering, and Fixes

React Apps Not Indexed: Hydration, Rendering, and Fixes

The report usually arrives with a screenshot: the site loads, the routes work, the copy is on screen, and Google has nothing. A React app not indexed is rarely one broken thing. It is a chain. Google fetched a nearly empty document, queued the page for rendering, rendered something that did not match what you see on your machine, and made a judgement on that version. Which link in the chain gave way decides whether you are editing one line of robots.txt or moving rendering onto a server, so it is worth finding out before you rewrite anything.

What Google actually receives from a React app

There are two documents in the life of every React page. The first is the shell your server returns: often a <div id="root"></div>, a script tag, and little else. The second is the DOM that exists after your bundle runs. Google’s JavaScript SEO documentation connects them: Googlebot crawls the shell, puts the URL in a render queue, runs the page in a headless browser when resources allow, and only then passes the result to indexing.

Two things follow. Rendering happens on Google’s schedule, not yours. And it can go wrong in an environment you never see, so the version judged may be a skeleton screen, a spinner, or an error boundary fallback.

One rule matters before you touch anything else. If the initial HTML carries a noindex robots meta tag, Google skips rendering the page altogether. A shell that ships noindex from staging and removes it later in a useEffect has written an instruction Google reads and a correction Google never runs.

Why a React app ends up not indexed

Most cases fall into a handful of patterns, all specific to how React builds a page.

Content that only exists after a fetch. Data pulled in useEffect arrives after the first paint. If your API is slow, rate-limits an unfamiliar client, or refuses a request without a cookie, the rendered DOM holds loading placeholders. Google indexes those, or decides there is nothing worth keeping, one of the ordinary routes to a page Google crawled and then set aside.

Hydration that throws away good HTML. This is the one people miss. When server output and client output disagree, React can discard the server-rendered subtree and re-render it in the browser. If that client render then throws, because something touched window during render or a date formatted differently, you are left with an error boundary fallback or an empty root. The server sent correct, indexable HTML and the browser step removed it.

Routes that are not URLs. Hash routing (/#/pricing) gives you one URL as far as Google is concerned, since everything after the fragment never reaches the server. Navigation wired to onClick instead of a real href is invisible to a crawler that discovers pages by following links.

Missing routes that return 200. A <NotFound /> component rendered over a successful response produces soft 404s at whatever scale your router allows.

Metadata written too late. Titles and canonical tags injected after mount exist only in the rendered version, if rendering happens at all.

Work out which stage broke

Guessing here is expensive. Three checks usually settle it.

Fetch the raw HTML with curl and search it for a distinctive sentence from your page. Present means the shell carries your content; absent means everything depends on the render step. Then run the URL Inspection tool on two or three representative URLs and read the rendered HTML, the screenshot, and the resources Google could not load. Finally, reproduce hydration in a production build with a throttled network and watch for mismatch warnings. Development mode forgives things production does not.

Then check the outcome, not the mechanism. Rendering cleanly is not the same as being in the index, and teams spend a fortnight on the first while assuming the second. This is where AIndexify fits: paste or upload the affected URLs, and each is checked against live Google results on a fixed schedule, with submitted and indexed reported as two separate events and the date the page was found. The preflight matters here too. A URL carrying noindex, blocked by robots.txt, or returning a 404 comes back as “Couldn’t check” with the credit refunded, and for a React app that is often the whole diagnosis.

Fixes, cheapest first

  1. Unblock your own bundle. If robots.txt disallows /assets/ or /static/js/, the renderer cannot fetch the scripts that build the page, and nobody sends you an error.
  2. Remove noindex from the shell. Check the built index.html, not the template you remember writing.
  3. Give every route a real path and every link a real href. Use the History API rather than hash routes.
  4. Return proper status codes for URLs that do not exist, which usually means an edge function rather than a static host’s catch-all rewrite.
  5. Make hydration survivable. Keep server and client output identical, move browser-only access into effects, and treat a mismatch warning as a bug rather than noise.
  6. Move the pages that need to rank onto the server. Server rendering or static generation puts your content in the first response, so indexing stops depending on a second step. You rarely need it for the whole app, only for the routes meant to be found.

Confirm it with the index, not the deploy

A rendering fix is a hypothesis until Google acts on it. Ship the change, resubmit the affected URLs, and watch what the checks report over the following days. If delivery keeps succeeding while the pages stay unindexed, the problem was never discovery, which is why it pays to read submitted and indexed as separate facts. The wider checklist, for the parts that are not React’s fault, lives in the complete guide to Google indexing.

See where your pages actually stand: submit your URLs and let the scheduled checks report what Google decided about the rendered page.

Sources