40% off month one for the first 200 websitesSee pricing

Why Google skips your Vite React app, and how to fix React SEO

React SEO on a Vite single-page app starts with what your server sends: one index.html for every address. The fixes, route by route, and what Vunora checks.

Published Updated 9 min read
Browser developer tools showing the page a script built inside a div with the id app
Photo: Pankaj Patel on Unsplash

React SEO on a Vite site starts with one file. Your server sends the same index.html for every address: an empty root div, a script tag, and the starter title until you change it. Google can still index a single-page app, because it runs your JavaScript before it indexes a page. It cannot give a route a title you never set. It cannot follow a link that is only a click handler, or tell a missing page from a real one. And a crawler that runs no JavaScript keeps that empty file.

So the work goes route by route. You need real paths, real links, a title and description on each route, and honest 404s. Where you need the words in the HTML, you pre-render. Below is each fix in your code, then what Vunora checks and changes on a Vite site. Still choosing where the words live? Read how to pick a CMS for a React app. For the wider picture, read the JavaScript SEO guide for vibe coded sites.

If Lovable made your app, check its age first. Lovable's docs, read 1 Dec 2026, say apps created from May 13, 2026 (June 22, 2026 on Enterprise plans) use TanStack Start with server-side rendering. Older Lovable apps are React with Vite and keep that setup unless the owner upgrades, so this post is about them. How to fix Lovable SEO covers both kinds.

What Google does with a Vite and React app

This is the index.html a new Vite app with React and TypeScript starts with:

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite + React + TS</title>
  </head>
  <body>
    <div id="root"></div>
    <script type="module" src="/src/main.tsx"></script>
  </body>
</html>

Every address on your site answers with this file. The browser runs /src/main.tsx, React builds the page inside root, and only then do your words exist. That is client-side rendering.

Google's docs say it "processes JavaScript web apps in three main phases": crawling, rendering and indexing. Googlebot fetches the file, renders the page in a browser, then indexes what your script built. So yes, Google indexes single-page apps. For the wait before rendering, and the AI crawlers that never run your script, read why search engines skip your pages.

What each reader gets from a Vite single-page app

Before the fixesAfter the fixes
GoogleEvery route indexed under the starter titleEach route indexed with its own title and description
A crawler that runs no JavaScriptAn empty page at every addressYour words in the HTML of each pre-rendered route
An address with no pageThe app loads, often with a 200 statusA 404 status, or a page marked noindex
A link made from a click handlerGoogle cannot discover itAn a element with an href that Google can follow
What changes for each reader when you make the fixes below.

The React SEO checklist for a Vite app

React SEO on a Vite app

0 of 6 done

  • Not done yet: Each page has its own path, not a # route
  • Not done yet: Every link is an a element with an href
  • Not done yet: Each route sets its own title and description
  • Not done yet: index.html has your site's title, not the starter one
  • Not done yet: Missing pages answer 404 or carry noindex
  • Not done yet: Routes you know ahead of time are pre-rendered
Each line is a fix in your code. The sections below show how.

Give each page its own path

Google's docs are direct: "don't use fragments to load different page content."

The part of an address after the # never reaches your server, so /#/pricing is not a page of its own. Use your router's browser mode, so the address reads /pricing. Then set your host to answer each path with index.html, or a reload on /pricing finds nothing.

Google's docs put it plainly: "Google can only discover your links if they are <a> HTML elements with an href attribute."

A button or a div that calls navigate() on click moves your visitor, but it leaves Google no link to follow.

React Router's <Link> is, in its docs' words, "a progressively enhanced <a href> wrapper", so links made with it pass.

Set a title and description on each route

From React 19, any component can render <title> and <meta>. React's docs say it always places the <title> element in the document's <head>, wherever in the tree you render it.

export function PricingPage() {
  return (
    <>
      <title>Pricing | Your site</title>
      <meta name="description" content="Plans for every team size, and what each one includes." />
      <h1>Pricing</h1>
    </>
  )
}

The same docs give two rules. Render one title at a time. With two, React puts both in the head, and its docs say browsers and search engines then behave in undefined ways. And give the title a single string. <title>Results page {pageNumber}</title> passes two children, and React says "This will cause an error." Build the string first:

<title>{`Results page ${pageNumber}`}</title>

Older apps often do the same job with a <Helmet> block from React Helmet. Either way, these tags are set in the browser. Google reads them after rendering. A crawler that runs no JavaScript never sees them.

Replace the starter title in index.html

The title in index.html is the one every page has before your script runs, and the one a crawler that runs no JavaScript keeps. Change Vite + React + TS to your site's name. Add a description and Open Graph tags there too, written for the site as a whole, because every route shares them.

Answer 404 for pages that do not exist

On a single-page app, an address with no page behind it still loads index.html, and your router shows its not-found screen. To a crawler, that can look like a real page, which Google calls a soft 404. Google's docs give two ways out:

  • "Use a JavaScript redirect to a URL for which the server responds with a 404 HTTP status code (for example /not-found)."
  • "Add a <meta name="robots" content="noindex"> to error pages using JavaScript."

With React 19, the second one is a few lines in your catch-all route. How to fix a soft 404 on a single-page app covers the first one and how to test both.

<Route path="*" element={<NotFound />} />
 
function NotFound() {
  return (
    <>
      <meta name="robots" content="noindex" />
      <h1>Page not found</h1>
    </>
  )
}

Pre-render the routes you know

Every fix above helps Google. None of them puts words in the HTML your server sends. For that, your build or your server has to render each page before it reaches the browser.

Vite has server-side rendering built in. Its guide calls that "a low-level API meant for library and framework authors."

The same guide describes a simpler path for routes you know ahead of time, with their data. You pre-render them "into static HTML using the same logic as production SSR." The guide calls this "a form of Static-Site Generation (SSG)."

Static site generation and Jamstack explain the pattern: pages built ahead of time and served as files.

Serving crawlers a separate rendered copy is called dynamic rendering. Google now calls it "a workaround and not a long-term solution", and recommends server-side rendering, static rendering or hydration instead.

Pre-rendering is a developer's job and a framework choice. Next.js renders pages on the server, so every page's words are in the first HTML. The Next.js SEO guide covers that side.

Prompt for Claude Code or Cursor
Check this Vite and React app for these SEO problems. Report first, and change nothing until I say yes.

1. Routes: does the router use paths such as /pricing, or # routes such as /#/pricing? Name the file that sets this up.
2. Links: list every place that moves to another page through a click handler instead of an <a href> or a router <Link>.
3. Titles: list the routes that do not render their own <title> and <meta name="description">. Flag any route that renders two <title> elements, or a <title> with more than one child.
4. index.html: is the title still "Vite + React + TS"? Does it have a meta description?
5. Missing pages: what does a path that does not exist show? Does that page render <meta name="robots" content="noindex">?
6. Pre-rendering: does the build pre-render any routes to HTML? List the routes whose content is known at build time.

For each problem, name the file and propose the smallest fix.

Paste it in your tool, opened in your site's repository.

How Vunora checks a Vite site

Vunora's SEO checklist runs its checks after each import and each publish, and every Monday morning. A run reads up to 50 pages of your live site, the way a crawler reads them. It reads the HTML your server sends, before any script runs.

On a Vite single-page app, every page it reads sends the same HTML. Vunora takes that as a sign that the site builds its pages in the browser, and "Pages render on the server" fails.

A Vunora check of a Vite single-page app

What it readsWhat it says
Pages render on the serverThe HTML your server sendsYour server sends the same HTML page for every address, so search engines that run no scripts see one page, not 12.
Images use WebP or AVIF, and Breadcrumb markupEach page's own HTMLNot checked: your site builds its pages in the browser, so the server sends one HTML page for every address.
Page titles, Meta descriptions, One H1 per page, canonical links, noindex and structured dataThe pages and fields you keep in VunoraChecked in Vunora only. Your site builds its pages in the browser, so the server sends one HTML page for every address.
sitemap.xml lists every pageYour live sitemap and the pages you publishFix sitemap.xml adds a build step to your repo
Check names and messages as Vunora shows them.

Pages render on the server has no Fix button. Its card says: "Build your pages as HTML on the server or at build time, so each address sends its own page." That is the pre-rendering work above, in your code. Vunora adds no server rendering or pre-rendering to a Vite app. If a site that passed starts to fail this way, the Monday run tells your workspace admins once, by email and in the app.

What you can change in Vunora on a Vite site

After the import, each page in Vunora has an SEO tab. The import guide walks through the import itself. On a Vite site, what the SEO tab can change depends on where the page's head is set.

  • The title and description every page shares. These live in your index.html. The SEO tab has a Site head section for them, along with the Open Graph title and description. Saving commits the change to your repo or opens a pull request, as your site is set to do. Your site shows it after its next build. The section needs write-back to the repository turned on in the site's settings.
  • A page whose code sets its head. Some pages set their head in a <Helmet> block that the import wired to content. On those, the title and description boxes edit that content.
  • Pages your team adds in Vunora. On a site that uses React Router, the import adds a route for them. Each one's title, description, canonical URL, social card and structured data come from its own SEO tab. Vunora's helper sets them in the browser, so, like the React 19 tags above, only crawlers that run JavaScript see them.
  • Canonical and robots on pages that share index.html. Vunora locks these boxes and says why: the site does not read them from Vunora. Change them in your code.

For the sitemap, Fix sitemap.xml adds a script that writes sitemap.xml at build time. It lists every page and post you publish in Vunora. The Lovable SEO guide shows the one-line change it makes to your build, and how to build and submit sitemap.xml on a React or Vite site covers the file itself.

Where this stops

  • Vunora adds no server rendering or pre-rendering to a Vite app. That stays a developer's job.
  • Titles and descriptions on the pages your team adds are set in the browser.
  • Vunora does not submit your sitemap to Search Console. You do that once, in Search Console.
  • Vunora imports Next.js, Vite with React, and TanStack Start only, from a GitHub repo.
  • No check can promise a ranking. Checks remove the reasons a page gets skipped.

Questions

Is React bad for SEO? No. Google renders React pages before it indexes them. The trouble starts when every route sends the same empty HTML, shares one title, or links with click handlers.

Is Vite good for SEO? Vite builds your app. What a search engine gets depends on what your server sends. A plain Vite and React app sends one index.html for every address. Pre-rendering puts each route's words in its own HTML.

Does Google index single-page apps? Yes. Googlebot renders the page and indexes what your script builds. Not every crawler runs JavaScript, so the HTML before the script still matters.

Do I need Next.js for React SEO? Not for Google to index your pages. Next.js helps when you want every page's words in the first HTML without building that step yourself.

Can Vunora change the title of a Vite page? Yes. The title every page shares lives in index.html, and the Site head section of the SEO tab saves changes to it in your repo. Pages your team adds take their title from their own SEO tab.

Sources

Terms in this post

Share

New posts by email

One email when a post goes up, about editing and publishing a vibe coded site.

We use your email only to send new posts, and every email has an unsubscribe link. See the Privacy Policy.

Three ways to start

  1. Do it yourself

    Connect your GitHub and see the answer on screen.

    Join the waitlist
  2. Talk to us

    We look at your site with you and answer your questions.

    Book a call
  3. Send it to your developer

    Your developer gets one page that explains the step.

    Email your developer

Built your site with an AI coding tool? Edit it here, no prompt needed.

Connect your site. Vunora tells you if it works for your site and what it will cost. You pay only after that.

Join the waitlistBook a callOne plan, set by your page count · AI from a prepaid wallet with a monthly limit · See pricing