Web Development
JavaScript SEO for React and Next.js: What Google Sees
Updated 7 November 2026·8 min read·MeraSEO, Mumbai
Your developers built the site in React, Vue or Next.js and it looks great in a browser. Then Search Console shows pages without titles, important sections missing from the rendered HTML in URL Inspection, or routes that never get indexed. The site works for users and fails for crawlers.
This post is for startups, agencies and in-house teams who already have a JavaScript-driven site and want to audit it. If you are still choosing a stack, start with our comparison of tech stacks for a business website instead.
In simple terms, Googlebot works in two stages. First it fetches the page’s HTML, notes the links it finds and queues the page. Later it renders the page in a headless version of Chrome, runs the scripts and reads the resulting content. Rendering takes extra resources, so it can lag behind the first fetch.
That is why where the content comes from matters. Google’s own JavaScript SEO basics describe this process and its limits.
| Approach | What the first HTML contains | SEO risk |
|---|---|---|
| Client-side rendering (CSR) | An almost empty shell plus a script bundle. The browser builds the page. | Highest. Depends entirely on rendering. Crawlers that do not run JavaScript see little or nothing. |
| Server-side rendering (SSR) | Full content, built on the server for each request. | Low. Watch server response time and caching. |
| Static generation (SSG) | Full content, built ahead of time as files. | Lowest for content that changes rarely. Needs a rebuild when content changes. |
For marketing pages, service pages and blog posts, SSR or SSG is usually the safer default. Reserve client-side rendering for logged-in dashboards and interactive tools that you do not need indexed. This is also why a headless build, such as WordPress as the content source with a Next.js front end, needs the rendering mode chosen deliberately. See our headless WordPress development page for how we approach it.
You may also read about dynamic rendering, where bots get a pre-rendered copy and users get the JavaScript app. Google describes it as a workaround rather than a recommended solution, so treat it as a stopgap while you move key pages to SSR or SSG.
A second quick test: disable JavaScript in your browser’s developer tools and reload. Whatever remains is roughly what a non-rendering crawler gets.
Googlebot follows <a href=”…”> elements. A card or button that navigates through an onClick handler, or an anchor with only a hash, gives it nothing to follow. Use real anchors with real URLs, and let the router intercept clicks for users (the Next.js Link component, for example, renders a normal anchor). Route with real paths through the History API, not #/ fragments, which Google does not reliably treat as separate pages. It is the same family of problem as dead buttons on a WordPress site, which we cover in finding and fixing broken links and dead buttons.
Single-page apps often update the page content but not the document title or meta description, so every route shares the homepage’s. Set a unique title, meta description and canonical per route, in the server-rendered head. Our guide to title tags and meta descriptions covers how to write them.
Google does not click tabs, accept cookie banners or type into filters. Text that loads only after such an interaction may never be seen. Googlebot also does not scroll like a person, so content fetched by a scroll event listener, or an infinite feed with no paginated URLs, can be missed. Lazy loading that uses native loading=”lazy” or IntersectionObserver is the safer pattern. Content that needs a click should already be in the HTML, then hidden with CSS.
Many SPAs return a 200 status for every URL and draw a “not found” screen in the browser. Crawlers read that as a real page. Make the server return an actual 404 status for unknown routes, and give the same treatment to deleted products or posts. If the app is purely client-side and the host cannot do that, Google’s documented fallbacks are to redirect with JavaScript to a URL that does return 404, or to add a noindex robots meta tag to the error view.
If robots.txt blocks the JavaScript or CSS files, Google renders a broken page. Allow crawling of the folders that hold your bundles, and watch for scripts hosted on a third-party domain that fails or times out.
Do not assume so. Documentation varies by crawler, and many AI-related crawlers are reported not to execute scripts, so a client-side-only page can look empty to them. The cautious approach is to ensure your key content, links and structured data are present in the initial HTML. To check which bots visit you and what they request, see our guide to AI crawlers, server logs and robots.txt.
| Check | How to test | Pass if |
|---|---|---|
| Main content in the first HTML | View source, search for a body sentence | The sentence is present |
| Unique title and meta per route | Crawl the site, export titles | No duplicates across routes |
| Crawlable internal links | Inspect nav and cards in rendered HTML | Each is an anchor with a real href |
| Real 404 status | Request a made-up URL and read the response code | Returns 404, not 200 |
| Scripts and styles crawlable | URL Inspection, More info, page resources | No blocked resources |
| Content not behind interaction | Compare rendered HTML with the visible page | Tab and accordion text is in the DOM |
| Structured data present | Rich Results Test on the URL | Detected without errors |
| Speed after rendering | PageSpeed Insights, mobile | LCP at or below 2.5 s |
Heavy JavaScript bundles also hurt Core Web Vitals, which is a separate reason to render on the server. The web.dev guide to Core Web Vitals explains the thresholds, and our technical SEO service covers rendering and speed audits together.
Titles, canonical tags and structured data should be rendered on the server along with the content. If a script injects them after load, Google may still pick them up, but you are adding a dependency for no benefit. In the Next.js App Router this means exporting metadata or generateMetadata from the page or layout (Pages Router sites use next/head) rather than setting the title from a client component after load. Validate JSON-LD with the Rich Results Test, and make sure each route outputs only the markup that matches its own content, not a copy of the homepage’s.
Yes, Google renders JavaScript and can index React pages. But it does so after the first fetch, and problems such as missing links, duplicate titles or blocked scripts can keep pages out. Server-side rendering or static generation makes the content available in the initial HTML and reduces the risk.
Use the URL Inspection tool in Search Console, run a live test, and open View tested page. Compare the rendered HTML and screenshot against what you see in the browser. Search the HTML for your headline, body text and links.
Next.js supports server rendering and static generation, which suit SEO well, but it is not automatic. You still need per-page titles, real links, correct status codes and fast pages. A badly configured Next.js site can still have the same problems as any client-side app.
Do not rely on it. Support differs between crawlers and many do not execute scripts. Put your key content, links and structured data in the initial HTML, then check your server logs to see which bots actually visit and what they receive.
We build headless WordPress and Next.js sites with rendering, metadata and crawlability planned from the start, and we audit existing JavaScript builds.
Talk about headless WordPress →WhatsApp us