React & Next.js SEO

React SEO Guide: How to Make React and Next.js Sites Rank

A React SEO guide: why client-rendered React stays invisible to search, which fixes to make first, how to check your own site and what each fix costs.

Why trust this guide: I've shipped 40+ live production websites in React and Next.js as the sole frontend developer on each build, I fix React SEO for clients through my React and Next.js SEO service, and I built the free SEO audit tool that checks the raw HTML the way a crawler does.

This React SEO guide answers one question first: is React bad for SEO? No. Client-side rendering is. A standard React app sends the same nearly empty HTML for every URL and builds the page in the browser, so search engines get a blank page and one shared title. Fix how pages are delivered (real HTML per URL, its own title and description, a sitemap, fast first paint) and React ranks like any other site.

Below are the fixes in the order I do them, the checks you can run yourself, and what each fix costs.

The fixes, in order of impact:

  1. Real HTML for every URL, built on the server or at build time.
  2. A unique title and meta description in that HTML, for every page.
  3. sitemap.xml, robots.txt and canonical URLs, so crawlers find every page once.
  4. Structured data (JSON-LD) that says what each page is.
  5. A fast first screen (Core Web Vitals), with the real content painted first.
  6. Crawlable links and clean URLs, plus a ping to search engines after each deploy.

If you only do the first two, you've fixed most of the damage. The rest is what turns an indexed site into one that competes.

Is React bad for SEO?

React is a library for building interfaces. It doesn't decide where your HTML gets built. You do, through the setup you pick.

There are two ways a React page can reach a visitor:

  • Client-side rendering (CSR). The server sends a small HTML file with an empty <div id="root"> and a script. The browser downloads the script, runs it, and only then does the page have headings, text and links. Vite and Create React App work this way by default. For a site built on the now-deprecated Create React App, my guide to fixing Create React App SEO problems covers helmet, prerendering and the Next.js move.
  • Server or build-time rendering. The HTML for each URL already contains the page. React then "hydrates" it in the browser (attaches the click handlers), so it still behaves like an app.

The first is what people mean by "React is bad for SEO". The second is what Next.js, and frameworks like it, give you. Same components, same design, different delivery.

So the honest answer: React is fine, a single-page app built with CSR is a weak starting point for search, and the fix is in the delivery, not a rewrite.

How does Google index a JavaScript site?

Google does run JavaScript. Its own guide to JavaScript SEO basics describes three steps: crawl the URL, render the page (run the JavaScript in a headless browser), then index what it sees.

The catch is the middle step. Rendering is expensive, so pages wait in a queue before Google runs them. For a client-rendered site, everything depends on that step going well:

  • If a script throws an error, Google indexes the empty shell.
  • If the content waits on an API call that is slow or blocked, Google may index the page before the data arrives.
  • If links are buttons with click handlers instead of real <a href> tags, Google can't follow them to your other pages.

Google is the patient one. Plenty of other readers of your HTML never run JavaScript at all:

  • Link previews on WhatsApp, Slack, X and LinkedIn read only the raw HTML. An empty shell gives you a preview with no title, no description and no image.
  • Many AI search tools and crawlers fetch the HTML and move on.
  • Other search engines render less, and less often, than Google.

That's why "Google can render JavaScript" isn't the end of the discussion. The question is not whether one crawler can eventually see your page. It's whether every reader sees the right page on the first request. Real HTML is the only answer that works for all of them.

How to check what search engines see on your site

You can test this yourself without a developer. Use your home page and one inner page, such as a service or product page.

  1. View the source. Right-click the page and choose View page source (not Inspect). Press Ctrl+F and search for a sentence you can see on screen. If it isn't there, the content is built by JavaScript.
  2. Compare the tab titles. Open three different pages. If the browser tab shows the same title on all of them, that's what search engines see too.
  3. Open /robots.txt and /sitemap.xml on your domain. If either one shows your home page or an error instead of a plain text or XML file, crawlers have no map of the site.
  4. Paste a page link into WhatsApp or Slack. A preview with no title or image means the raw HTML is missing its tags.
  5. Use URL Inspection in Google Search Console if you have access. "View crawled page" shows the HTML Google stored, and the coverage report shows whether the page is indexed at all.

If you'd rather get a scored list, my free SEO audit tool fetches the raw HTML the way a crawler does, checks the title, description, headings, structured data, robots.txt and sitemap, and runs Google's PageSpeed test. It's the same first pass I run before quoting any fix.

When I find an empty source, a single shared title and no sitemap together, the diagnosis is almost always the one in my post on why a React website is not ranking on Google, which walks through each of these causes in more detail.

How do I make a React app SEO friendly?

This is the order I work in on client sites. Each step builds on the one before, so skipping ahead rarely pays.

1. Send real HTML for every URL

Everything else depends on this. Each URL should return HTML that already holds its headings, text, images and links.

You have two clean ways to get there:

  • Static generation (SSG): the HTML for every page is built once, at deploy time, and served from a CDN. Fastest option, and right for most business sites, blogs, portfolios and product catalogues that don't change every minute.
  • Server-side rendering (SSR): the server builds the HTML on each request. Use it for pages that depend on who is asking or on data that changes constantly.

Most real sites mix both: almost every page of a business site can be static, and only the few pages that need fresh data are built on request.

2. Give every page its own title and description

Each page needs a unique <title> that fits in the search result and a meta description of 150–160 characters that tells the searcher what they get. Both must be in the HTML the server sends, not added later by a script.

This is where react-helmet falls short. It sets the tags in the browser after React runs. Google may pick them up after rendering, but the raw HTML still carries the one title from index.html, and link previews show that.

3. Add sitemap.xml, robots.txt and canonical URLs

  • sitemap.xml lists every page you want indexed, so new pages are found without waiting for a link.
  • robots.txt allows crawling and points to the sitemap. Check it doesn't block your JavaScript or CSS files; Google needs them to render.
  • A canonical URL on every page tells search engines which address is the real one, so www and non-www, trailing slashes or tracking parameters don't split your page into duplicates.

4. Add structured data

Structured data is a small block of JSON-LD that says what a page is: a person, a business, a service, an article, a product. It helps Google connect your pages to your brand and can make a result richer. Put it in the server HTML like everything else.

5. Make the first screen fast

Google measures real-user speed with Core Web Vitals. The one React sites fail most is Largest Contentful Paint (LCP): the time until the biggest thing on screen appears. I cover the React-specific causes in the speed section below.

Every link between your pages should be a real <a href>, not a div with an onClick. Use clean paths (/services/seo) rather than hash routes (/#/services), because search engines treat everything after # as the same page.

After each deploy, notify search engines about new and changed pages. I set up IndexNow to submit the sitemap automatically after every production deploy, which covers Bing and the other engines that support it.

SSR, static generation or a prerender service: which rendering fits?

This is the decision that shapes every other fix. Here is how the options compare for SEO for single page applications and the sites that grow out of them.

ApproachWhat crawlers getGood forWatch out for
Client-side SPA (Vite, CRA)Empty shell, one titleLogged-in apps that don't need search trafficInvisible to link previews and many crawlers
Prerender service in front of the SPAA snapshot made for botsA stopgap while you plan a migrationAnother moving part; bots and people can see different pages
Static generation (Next.js)Full HTML built at deployBusiness sites, blogs, cataloguesPages need a rebuild or revalidation to change
Server-side rendering (Next.js)Full HTML built per requestPersonalised or fast-changing pagesServer cost and a slower first byte if data is slow

Prerender services deserve a word of caution. They detect bots and serve them a pre-built copy of the page, which is what Google calls dynamic rendering. Google's own documentation now describes dynamic rendering as a workaround rather than a long-term solution, and recommends server rendering or static generation instead. When the snapshot service fails quietly, bots get stale or empty pages and nobody notices for weeks.

Is Next.js good for SEO?

Yes, because it makes the right setup the default. Next.js SEO comes down to four built-in pieces that a plain React app has to bolt on. For the head-to-head version, with the HTML a crawler gets from each, see React vs Next.js for SEO.

Pages are rendered before they reach the browser. In the App Router, components are server components unless you mark them otherwise, so their output is already HTML.

Metadata is part of each route. You export metadata (or generateMetadata for dynamic pages) from the route file and Next.js writes the title, description, canonical and social tags into the server HTML. The generateMetadata docs cover every field. A service page looks roughly like this:

// src/app/services/[slug]/page.tsx
import type { Metadata } from "next";
import { getService } from "@/lib/services";

export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }): Promise<Metadata> {
  const { slug } = await params;
  const service = getService(slug);
  return {
    title: service.seoTitle,
    description: service.description, // 150–160 characters
    alternates: { canonical: `/services/${slug}` },
    openGraph: { title: service.seoTitle, description: service.description },
  };
}

The sitemap and robots.txt are code. A sitemap.ts file in the app folder returns your URLs, so a new page can't be forgotten:

// src/app/sitemap.ts
import type { MetadataRoute } from "next";
import { getAllPosts } from "@/lib/blog";

export default function sitemap(): MetadataRoute.Sitemap {
  const base = "https://example.com";
  const posts = getAllPosts().map((p) => ({ url: `${base}/blog/${p.slug}`, lastModified: p.updated ?? p.published }));
  return [{ url: base }, { url: `${base}/services` }, ...posts];
}

Images and fonts are optimised for you. next/image serves modern formats in the right size, and next/font self-hosts fonts so text doesn't wait on another server. For every setting in one list, with a test for each, use my Next.js SEO checklist for App Router sites.

One warning: Next.js doesn't fix SEO on its own. If you mark the whole app "use client" and fetch everything in a useEffect, you've rebuilt a client-side SPA on a different framework. The official migration guide even starts that way, so treat it as stage one: crawlers still get an empty page until you move data fetching into server components and drop "use client" from pages that don't need it.

If you're choosing a platform from scratch rather than fixing an existing React app, I compare the trade-offs in Next.js vs WordPress for a business website.

React SEO best practices for speed

Speed is the part of technical SEO for React that people see as well as search engines. Google's Core Web Vitals are LCP (how fast the main content appears), INP (how quickly the page responds to a tap) and CLS (how much the layout jumps). React sites tend to fail them for the same handful of reasons:

  • A preloader that hides the page. A spinner covering finished content pushes LCP back to whenever the spinner leaves. Show the real content first.
  • One big JavaScript bundle. Everything ships to every page, so the phone spends seconds parsing code it doesn't need. Split by route and load heavy parts only where they're used.
  • Heavy libraries in the first paint. 3D scenes, animation libraries and maps belong after the main content. In Next.js, load them with next/dynamic and ssr: false so the HTML arrives without them.
  • Unsized, oversized images. Use next/image with a width and height so the browser reserves the space (no layout jump) and gets a modern format at the right size.
  • Fonts from another server. Self-hosting removes a round trip before text can paint.

What I check first in a React SEO audit

Free SEO audit tool

Free SEO audit: see what's stopping your site from ranking

Enter your website to get a score out of 100 and a fix list, checked the way Google reads your page. Free, no sign-up.

Is react-helmet enough for SEO?

It's the most common half-fix I see, so it gets its own answer: no.

react-helmet (and its maintained fork, react-helmet-async) changes the <title> and meta tags after React runs in the browser. That has three limits:

  • The HTML the server sends still has the single title from index.html, so every crawler that skips JavaScript sees one title for the whole site.
  • Link previews read that same raw HTML, so shared links show the wrong title and no image.
  • Google sees the right tags only if rendering succeeds, which puts your most important on-page signal behind the render queue.

react-helmet-async can work well inside a server-rendered setup, because then the tags are in the first HTML. On a client-rendered SPA it treats the symptom, not the cause.

Common React SEO mistakes I find in audits

These come up again and again when I audit React sites. Each one is cheap to fix once you know it's there.

  • Hash routing. URLs like /#/about look like separate pages to visitors, but search engines see one page. Switch to path-based routes.
  • Links that aren't links. Navigation built from divs or buttons with onClick handlers gives crawlers nothing to follow. Use real <a href> tags (Next.js Link renders one).
  • A missing page that returns "OK". A SPA answers every unknown URL with the same shell and a success status, so a typo URL looks like a real, empty page. Return a real not-found status for missing pages.
  • noindex left over from staging. A noindex tag or a robots.txt Disallow: / copied from a test site silently removes everything from search.
  • Blocked scripts in robots.txt. If Google can't fetch your JavaScript bundle, it can't render a client-side page at all.
  • Content behind a click. Text that only exists after someone opens a tab or presses "load more", when it's fetched on click, isn't in the HTML. Render it and hide it with CSS instead.
  • The same title on every page. Usually the sign that metadata still lives in index.html.

What will the fixes cost, and who should do them?

Some of this a careful owner can check alone; the rendering change is developer work. These are my starting prices, in USD. Every project is quoted after a free call, because the final price depends on the size of the site.

ServiceFromDeliveryWhat you get
SEO audit$1502–3 daysA report and a fix list in priority order
Technical SEO setup for React/Next.js$500Metadata, sitemap, robots.txt, canonicals, structured data, speed fixes
React (Vite/CRA) to Next.js migration$800Every page as real HTML, design and animations kept
Monthly SEO + content$400/monthOngoing fixes and posts

Payment is 50% upfront and 50% on delivery, with 2 free revision rounds and 30 days of free bug fixes after launch.

A rough guide to which one you need: if view-source already shows your content, start with the audit or the technical setup. If it shows an empty root div, the migration is usually the better spend, because the setup work alone can't put content into HTML that doesn't exist.

How long until the fixes show up in Google?

The technical results are visible the day you deploy: view-source shows the content, every tab has its own title, and Lighthouse reflects the new scores.

Rankings take longer and depend on things no developer controls: how often Google crawls your site, how much useful content each page has, and who you compete with. I never promise a ranking date, and you should be wary of anyone who does.

You can speed up discovery, though. Submit the sitemap in Search Console, request indexing for your most important pages with URL Inspection, and keep the sitemap current so new pages are found without waiting for a link. If Search Console lists pages under "Why pages aren't indexed", my guide to fixing a React site that Google isn't indexing maps each status to its cause. After that, the work that moves rankings is content that answers real questions, which is what every guide in this series does for one specific React SEO problem.

The React SEO guide as one checklist

Copy this list and tick off what your site already does. Anything left empty is your to-do list, roughly in priority order.

  • View-source shows the page's real text, not an empty root div.
  • Every page has its own title and a 150–160 character meta description in the raw HTML.
  • Links between pages are real <a href> tags with clean paths, no #/ routes.
  • /robots.txt allows crawling, doesn't block scripts or CSS, and points to the sitemap.
  • /sitemap.xml lists every page you want indexed and updates on deploy.
  • Every page has a canonical URL.
  • JSON-LD describes your business or person, and your articles or services.
  • Missing pages return a real not-found status.
  • No preloader hides finished content; heavy 3D, maps and animations load after it.
  • Images have a width, height, alt text and a modern format.
  • Shared links show the right title, description and image.
  • Search engines are notified of new pages after each deploy.

If three or more boxes are empty, start with the free SEO audit to see the exact list for your site, or look at what my React SEO services include if you'd rather have it fixed for you.

Every guide in React & Next.js SEO

Frequently asked questions

Is React bad for SEO?

React itself is fine. The problem is client-side rendering, where every URL sends the same empty HTML and the content is built later in the browser. Render the HTML on the server or at build time and a React site can rank like any other site.

Does Google index JavaScript sites?

Yes. Google crawls the page, puts it in a queue to run the JavaScript, and indexes what it sees after that. It works, but it's slower and breaks more easily than plain HTML, and many other crawlers and link previews never run JavaScript at all.

Is react-helmet enough for SEO?

No. It changes the title and meta tags in the browser after JavaScript runs, so the raw HTML still has one generic title for every page. Crawlers that skip JavaScript and social link previews never see the page-specific tags.

Is Next.js good for SEO?

Yes, when you use it to send real HTML. Next.js builds each page on the server or at build time, puts each page's title and description in that HTML, and generates the sitemap and robots.txt from code. A Next.js app that renders everything in the browser has the same problem as a plain React app.

How much does it cost to fix SEO on a React site?

With me, an SEO audit starts at $150 (2–3 days), a technical SEO setup for React or Next.js at $500, and a full React (Vite/CRA) to Next.js migration at $800. Every project is quoted after a free call.

Next step

Is your React site invisible on Google?

SEO audits from $150 and React to Next.js migrations from $800, without changing your design.

Keep reading

Related posts

React & Next.js SEO8 min read

React Open Graph Tags Not Working? Why Links Show No Preview

React Open Graph tags not working? Why WhatsApp and Slack show no preview, the server-side fix, and five Next.js mistakes that still break link cards.

Read the post
React & Next.js SEO8 min read

Create React App SEO Problems and How to Fix Them

Create React App SEO problems fixed in order of cost and effect: meta tags, prerendering or Next.js, plus the Vite trap nobody mentions and real prices.

Read the post
React & Next.js SEO8 min read

React vs Next.js for SEO: What Google Sees in Each

React vs Next.js for SEO, decided by the HTML each one sends to Google. See both side by side, which site types need Next.js, and what switching really costs.

Read the post