A React or Next.js site can look flawless in a browser and still be nearly invisible in search. The reason is rarely a penalty. It is usually that the HTML a crawler receives is not the page a human sees, because the content, the canonical tag, or the internal links only exist after JavaScript runs. For a local business with a few dozen service and location pages, that gap decides whether those pages get indexed at all.
This guide uses Next.js (App Router) as the worked example, because it is the most common React framework on production marketing sites. Every principle maps directly to Nuxt and SvelteKit, which we note where the vocabulary differs. We cover rendering strategies, metadata and canonicals, client-only content traps, routing and sitemaps, Core Web Vitals, and finish with an audit checklist you can run this week.
Googlebot fetches the raw HTML first, then queues the page for rendering in an evergreen version of Chromium. Google's own JavaScript SEO documentation describes this crawl, render, index pipeline. Two consequences matter. First, rendering can be delayed after the initial fetch, so anything you want indexed quickly should be in the initial HTML. Second, rendering has limits: it will not click buttons, scroll to trigger lazy content, or wait indefinitely for slow API calls.
The practical rule is simple: critical SEO content must be present in the server response or in the first render, without user interaction. That includes the title, meta description, canonical, robots directives, the H1, the main body copy, structured data, and every internal link you want crawled. How quickly that server response arrives matters too, and our guide to fixing slow TTFB shows how to measure and improve it.
Do not assume other consumers render JavaScript the way Google does. Many AI crawlers and social link-preview bots read raw HTML only. If your service descriptions load client-side, an answer engine may never see them. That is one reason server-delivered HTML now matters beyond classic rankings, and it is something an AEO check can surface quickly.
Rendering strategy is the single biggest technical SEO decision in a framework. Here is how the four options behave.
- CSR (client-side rendering): the server sends a near-empty shell and the browser builds the page. Google can usually index it eventually, but you depend on the render queue, a working API, and bundles that execute cleanly. Avoid it for any page meant to rank.
- SSR (server-side rendering): HTML is generated per request. Content is always fresh and fully present for crawlers, at the cost of server time. A slow database call becomes a slow Time to First Byte, which feeds directly into LCP.
- SSG (static site generation): HTML is generated at build time and served from a CDN. This is the fastest and most crawl-friendly option for content that changes rarely, such as service pages, blog posts, and city pages.
- ISR (incremental static regeneration): static pages that are regenerated in the background after a revalidation window or on demand. You keep CDN speed while updating content without a full rebuild.
The same ideas exist elsewhere under different names. Nuxt offers universal rendering, static generation, and route rules with swr and isr options. SvelteKit exposes prerender, ssr, and csr flags per route. The vocabulary changes; the SEO logic does not.
Do not pick one mode for the whole site. Match the mode to how often the content changes and how much it matters for search.
- Service pages, about, pricing: SSG. They change monthly at most.
- Blog and guides: SSG or ISR with a long revalidation window, plus on-demand revalidation when an editor publishes a fix.
- Location or city pages generated from data: ISR. Use
generateStaticParamsto prebuild the pages you care about, then let the rest generate on first request. - Inventory, availability, or review-heavy pages: SSR, or ISR with short revalidation, so crawlers do not index stale prices or hours.
- Logged-in dashboards and tools: CSR is fine. These pages should be
noindexor blocked anyway.
In the App Router, the main levers are a revalidate export (or fetch-level revalidation), export const dynamic, and revalidatePath or revalidateTag for on-demand updates. A typical location template looks like this:
// app/locations/[city]/page.tsx
export const revalidate = 86400; // regenerate at most daily
export async function generateStaticParams() {
const cities = await getTopCities();
return cities.map((c) => ({ city: c.slug }));
}
export default async function CityPage({ params }) {
const { city } = await params;
const data = await getCity(city);
if (!data) notFound();
return <CityTemplate data={data} />;
}
Content is in the HTML, the page is cacheable at the edge, and a missing city returns a real 404 rather than an empty template. If you suspect empty templates are being served with a 200 status, see our guide to detecting and fixing soft 404s.
The most common framework-era SEO bug is metadata that is wrong, duplicated, or injected late. In the App Router, use the Metadata API so tags are rendered on the server inside the initial HTML. Avoid setting document.title or injecting tags from a useEffect. Those changes happen after hydration, and crawlers or previews that read raw HTML will never see them.
// app/locations/[city]/page.tsx
import type { Metadata } from "next";
export async function generateMetadata({ params }): Promise<Metadata> {
const { city } = await params;
const data = await getCity(city);
if (!data) return {};
const path = `/locations/${data.slug}`;
return {
title: `${data.service} in ${data.name} | Example Co`,
description: data.summary.slice(0, 155),
alternates: { canonical: path },
openGraph: { title: data.service, url: path },
robots: { index: true, follow: true },
};
}
Set metadataBase once in the root layout so relative canonicals resolve to your full production origin. Then audit these recurring problems:
- Canonical inheritance: a canonical set in a parent layout can leak into child routes and point every page at the homepage. Set canonicals per route.
- Parameter duplicates: tracking parameters, sort orders, and filters create new URLs. Canonicalize to the clean version and keep internal links on it.
- Trailing slash and case: pick one form and redirect the other. Configure
trailingSlashdeliberately. - Preview and staging hosts: make sure they send
noindexand are not in your sitemap.
Render structured data as JSON-LD inside the server component too. LocalBusiness, Service, and FAQPage markup should appear in the response HTML, not be appended by a client script after load.
Even on an SSR framework, individual components can quietly opt out of server rendering. In Next.js, any component marked "use client" is still server-rendered on first load, but the data it fetches in useEffect is not. That is the trap: the HTML contains an empty list and a spinner, and the real content arrives only after hydration.
"use client";
// Risky: the HTML ships with an empty list
export function Services() {
const [items, setItems] = useState([]);
useEffect(() => {
fetch("/api/services").then(r => r.json()).then(setItems);
}, []);
return <ul>{items.map(i => <li key={i.id}>{i.name}</li>)}</ul>;
}
// Safer: fetch in a server component, pass down as props
export default async function ServicesPage() {
const items = await getServices();
return <ServicesList items={items} />;
}
Watch for these specific patterns:
dynamic(() => import(...), { ssr: false })on components that contain body copy, reviews, or FAQs. Reserve it for widgets such as maps and chat.- Content behind interaction: tabs and accordions are fine if the text is in the DOM on load. Content fetched only on click is not.
- Infinite scroll without paginated URLs: Google will not scroll. Provide crawlable
/page/2links. - Navigation via
onClickorrouter.push: crawlers follow<a href>. Use the framework link component, which renders a real anchor. - Hash routes: URLs after
#are not treated as separate pages. - Geolocation or cookie gates: if content only appears after the user grants location or accepts a banner, crawlers see the blocked state.
Hydration is a related concern. A mismatch between server and client output forces React to re-render, which can cause layout shifts and, in bad cases, content that differs between what Google fetched and what users see. Treat hydration warnings in the console as bugs, not noise.
What about dynamic rendering, serving prerendered HTML to bots and the SPA to users? Google describes it as a workaround rather than a recommended long-term solution, because it adds a second code path to maintain and can drift out of sync. If you are on a modern framework, move the content to SSR or SSG instead.
Search engines judge a route by its HTTP response, not by what your UI displays. A custom "Page not found" component served with a 200 status is a soft 404, and it wastes crawl budget while diluting site quality signals.
- Real 404s: call
notFound()when data is missing. Be aware that with streaming, once the response has started the status code can no longer change; Next.js then adds anoindexmeta tag instead. Resolve existence checks before you stream, outside of deferred Suspense boundaries. - Redirects: use
redirects()in config orredirect(). Permanent moves should return 308 or 301. Avoid client-side redirects throughrouter.pushin effects. - Robots: do not block
/_next/static/in robots.txt. Googlebot needs your JS and CSS to render the page. - Dynamic segments: every indexable URL should be reachable through internal links, not only through the sitemap.
The App Router can generate your sitemap and robots file directly from data, which keeps them in sync with the content:
// app/sitemap.ts
import type { MetadataRoute } from "next";
export default async function sitemap(): Promise<MetadataRoute.Sitemap> {
const cities = await getTopCities();
return cities.map((c) => ({
url: `https://www.example.com/locations/${c.slug}`,
lastModified: c.updatedAt,
}));
}
// app/robots.ts
export default function robots() {
return {
rules: [{ userAgent: "*", allow: "/", disallow: ["/account/"] }],
sitemap: "https://www.example.com/sitemap.xml",
};
}
Only list canonical, indexable, 200-status URLs, and set lastModified from the real content change date. For sites with many thousands of URLs, split into multiple sitemaps with generateSitemaps. Nuxt and SvelteKit achieve the same with a sitemap module or a server endpoint that returns XML.
Core Web Vitals are Largest Contentful Paint (good at 2.5 seconds or less), Interaction to Next Paint (200 milliseconds or less), and Cumulative Layout Shift (0.1 or less), all measured at the 75th percentile of real users. Framework apps tend to fail them in predictable ways.
- LCP: the hero image is the usual culprit. Use the framework image component with
priorityon the above-the-fold image, supply correctsizes, and avoid lazy-loading it. Fast SSG or ISR delivery from a CDN protects Time to First Byte. Do not make the LCP element depend on a client-side fetch. - INP: heavy hydration and large bundles block the main thread. Keep client components small and push
"use client"to the leaves of the tree. Split code with dynamic imports, defer analytics and chat widgets, and wrap non-urgent state updates instartTransition. - CLS: reserve space for images, embeds, and cookie banners. Load fonts through the built-in font module so fallback metrics are matched, and avoid content that pops in after hydration.
- Third-party scripts: use the script component with
afterInteractiveorlazyOnload, and audit tag managers regularly. They often cost more than your own code.
Measure with field data first (the Chrome UX Report through Search Console and PageSpeed Insights), then reproduce in lab tools such as Lighthouse and the Chrome Performance panel. Lab scores alone can look healthy while real users on mid-range phones fail INP.
Run these checks on a representative URL from every template: homepage, service page, location page, blog post, and a filtered or paginated listing.
- View source test: open view-source and confirm the title, meta description, canonical, H1, body copy, links, and JSON-LD are all present without JavaScript.
- Rendered comparison: compare view-source with the rendered DOM in the URL Inspection tool's "View crawled page". Differences in content or links are red flags.
- JavaScript disabled: load the page with JS off. Critical content and navigation should still work.
- Status codes: request a nonsense URL and a removed page, and confirm a true 404 or 410. Check redirect chains are one hop.
- Canonicals: verify each template self-canonicalizes to the clean absolute URL, and that parameter variants point to it.
- Links: crawl with a JavaScript-capable crawler and confirm every important page is reachable through real anchor tags.
- Robots and resources: confirm
/_next/assets are crawlable and staging is noindexed. - Sitemaps: check they contain only indexable 200 URLs and are submitted in Search Console.
- Vitals: review the Core Web Vitals report by URL group and fix the failing template, not individual pages.
- Index coverage: in Search Console, look at "Crawled, currently not indexed" and "Soft 404" for patterns by template.
If you want a fast first pass before a manual audit, run the site through our website SEO audit, then use the checklist above to investigate whatever it flags. Re-test after every major release, since a refactor that moves a data fetch into a client component can undo months of progress overnight.
Is Next.js good for SEO?
Yes, when you use its server rendering features. Static generation, ISR, and server components deliver complete HTML, built-in metadata handling, and fast delivery from a CDN. Next.js does not guarantee good SEO, though. Client-only data fetching, wrong canonicals, and soft 404s can still hurt a Next.js site, so you still need to audit each template.
Can Google index client-side rendered React pages?
Often, yes. Googlebot renders JavaScript with a recent Chromium and can index CSR content, but only after the page enters a render queue, and only if scripts and APIs work reliably. It is slower and less predictable than server-delivered HTML, and other crawlers may not render JavaScript at all, so avoid CSR for pages you want to rank.
Should I use SSR or SSG for local business websites?
Use SSG for most pages, including services, about, and blog posts, because static HTML is fastest and easiest to crawl. Use ISR for large sets of city or location pages that update occasionally. Reserve SSR for pages whose data changes constantly or per request, such as live availability, and keep logged-in tools client-rendered.
Is dynamic rendering still recommended?
No. Google describes dynamic rendering, which serves prerendered HTML to bots and a JavaScript app to users, as a workaround rather than a long-term solution. It adds a second rendering path that can drift out of sync. Moving content to SSR or SSG in your framework is more reliable and easier to maintain.
How do I check what Googlebot sees on my JavaScript site?
Compare view-source, which is the raw HTML, against the rendered page in Search Console's URL Inspection tool using the live test and the crawled page view. If content, links, or tags appear only in the rendered version, move them into server-rendered output. Also test with JavaScript disabled to catch fragile dependencies.
Turn this into a practical SEO action plan
Use RankLocalToday tools to check rankings, diagnose website issues, and prioritize the next organic traffic move.
Get your SEO plan →More in this topic: Website SEO, all 208 guides →