JavaScript SEO: How Google Renders JS, SSR vs CSR and Framework Fixes
JavaScript SEO is the work of making pages built with JavaScript easy for search engines and AI crawlers to crawl, render and index. Google runs JavaScript, often within seconds, but most AI crawlers do not. The safe setup puts the main text, links, title and canonical in the HTML the server sends.
By Raúl Díaz, founder of Slibur
Updated Published 14 min read

In this article
That gap between Google and everyone else is the heart of the topic. Google has rendered pages with an up-to-date Chromium since May 2019, yet its own documentation still recommends server-side or pre-rendering, because it makes sites faster and "not all bots can run JavaScript." Before worrying about rendering, make sure those bots are allowed in at all: Slibur's free AI crawler checker reads your robots.txt and shows, crawler by crawler, which ones may fetch your pages.
What follows covers how Google's pipeline works, how to choose between server-side and client-side rendering, the mistakes React, Next.js and Angular sites make most often, and how to test what each crawler actually receives. If you're running a full audit, the rendering checkpoint sits in the technical SEO audit checklist alongside everything else.
How Google crawls, renders and indexes JavaScript
Google describes three phases in its JavaScript SEO basics (opens in a new tab) guide, last updated March 4, 2026:
- Crawling. Googlebot reads robots.txt first. A disallowed URL is skipped, and Google won't render JavaScript from blocked files or on blocked pages. From the HTML response it collects the URLs in the
hrefattribute of links and adds them to the crawl queue. - Rendering. Every page that returns a 200 status code goes to the render queue, unless a robots meta tag or header says not to index it. When resources allow, a headless Chromium runs the scripts. Pages with other status codes, such as a 404, may never be rendered.
- Indexing. Google parses the rendered HTML for links a second time and uses that rendered version to index the page.
How long does the queue take? The best public data comes from Vercel and MERJ, who matched over 100,000 Googlebot fetches on nextjs.org in April 2024 with more than 37,000 rendered pages. Every HTML page in the sample was fully rendered, complex interactions included. The median page waited 10 seconds between crawl and render, and three in four were done within 26 seconds.
The tail is long, though: at the 90th percentile the wait was about 3 hours, and at the 99th it reached about 18 hours. The same study confirmed two rules that catch teams out. Pages with noindex in the initial HTML were not rendered, and neither were redirects or 4xx and 5xx errors.
What Google's renderer won't do
Google's guide to fixing JavaScript problems (opens in a new tab) and its lazy-loading guidance list the limits that matter in practice:
- No interaction. Google Search doesn't interact with the page, so content that loads only after a click or a scroll stays invisible. Lazy loading has to trigger when content enters the viewport.
- No permissions. Googlebot declines requests such as camera access, so content gated behind a permission prompt needs another way in.
- No memory. Local Storage, Session Storage and cookies are cleared between page loads, so content that depends on a saved state never appears.
- HTTP only. Googlebot doesn't use WebSockets or WebRTC, and feature detection shows it lacks WebGL. Provide an HTTP fallback.
- Aggressive caching. The Web Rendering Service may ignore caching headers and render with outdated JavaScript or CSS. Fingerprinted file names such as
main.2bb85551.jschange with every build and avoid the problem. - Selective fetching. Requests that don't contribute to essential content, like analytics and error reporting, may not be made at all. Your client-side analytics won't show Googlebot's real activity; the Crawl stats report in Search Console will.
The 2MB limit applies to every script
Googlebot's documentation (opens in a new tab), updated February 3, 2026, says Google Search crawls the first 2MB of a supported file. During rendering, each JavaScript and CSS file is fetched separately under the same limit, measured on uncompressed data. Anything past the cutoff is ignored. Many guides still quote a 15 MB figure, so check any checklist you rely on against the current page. Two habits keep you clear: split large bundles so no single file gets close to the limit, and watch the size of inline state that frameworks serialize into the HTML for hydration.
SSR vs CSR: choosing how your pages are rendered
Rendering is where the most important decision gets made. Google's Chrome team, in its Rendering on the Web guide on web.dev, updated January 5, 2026, encourages developers to consider server-side or static rendering over a full rehydration approach. The options compare like this:
| Method | Where the HTML is built | What a crawler gets without running scripts | Good fit |
|---|---|---|---|
| Client-side rendering (CSR) | In the browser, after scripts run | An app shell with little or no text | Dashboards and tools behind a login |
| Server-side rendering (SSR) | On the server, for each request | The full page | Product pages, listings, news, anything that changes often |
| Static rendering (SSG) | At build time, one HTML file per URL | The full page | Blogs, docs, landing pages |
| Prerendering | A client app run at build time to capture its first state | The first view of the page | Single-page apps that can't move to a framework yet |
| Dynamic rendering | A separate renderer that serves only bots | A server-rendered copy | Legacy setups; Google calls it a workaround |
Hydration is the step that connects the two worlds: client scripts attach state and event handlers to HTML the server already sent. Most modern frameworks render on the server and hydrate in the browser, which gives crawlers full HTML and users an interactive page.
Server rendering has costs. Generating each page on request can raise Time to First Byte, and the same app often runs twice, once on the server and once in the browser. Static rendering avoids the first cost but needs a file for every URL, which gets hard on sites with huge or unpredictable URL sets. React's own team makes a point worth repeating to developers: server rendering is not just for SEO, because it also cuts the JavaScript users must download before they see anything.
Dynamic rendering and prerender services
Google's dynamic rendering page (opens in a new tab) opens by calling it a past workaround rather than a long-term fix. Its suggested replacements are server-side rendering, static rendering and hydration, and the same page warns that other search engines may ignore JavaScript entirely. Serving bots a prerendered copy is fine while it matches what users see; the line where it becomes cloaking is covered in the guide to cloaking in SEO.
There's a second weakness that matters more each year. A dynamic renderer has to recognize crawlers, usually by user agent. Any bot missing from its list, including a new AI crawler, gets the client-side version and its empty shell.
Choosing per route
You don't need one method for the whole site. Next.js and Nuxt offer static and server rendering side by side, and Angular lets you set the mode route by route. A sound default: public pages that should rank or be quoted get SSR or static rendering, while pages behind a login can stay client-side. Moving an existing single-page app to a server-rendered framework changes URLs, templates and status codes at once, so treat it like a migration and follow a site migration checklist.
Common JavaScript SEO mistakes and how to fix them
Most problems on JavaScript sites come from a short list of patterns. Each one looks fine in a browser and breaks for crawlers.
| Mistake | What crawlers get | Fix |
|---|---|---|
Navigation through click handlers on spans or buttons, or javascript: URLs | No URL to follow | Anchor elements with a real href; Google says injecting them with JavaScript is fine if the markup is standard |
Hash routes such as /#/products | One URL for the whole app | Real paths with the History API; the AJAX crawling scheme has been deprecated since 2015 |
| Error routes that answer 200 | Soft 404s, and error pages in the index | Redirect to a URL that returns a real 404, or add a noindex robots tag with JavaScript |
| A noindex in the HTML that a script later removes | The page stays out, because Google may skip rendering | Leave noindex out of the initial HTML of pages you want indexed |
| A canonical rewritten by a script | Conflicting signals | Set it in the HTML; if JavaScript must set it, keep the same value and one tag only |
| Text loaded on click, tab change or scroll | Missing text | Put the text in the HTML and let the control only show or hide it |
| JavaScript files blocked in robots.txt | A blank or broken render | Allow every script the page needs to display its content |
Google's link best practices (opens in a new tab) show the first row with code. Links Google can parse are anchor elements with an href that resolves to a real address. An anchor with only an onclick, only a router attribute, or a javascript: value appears in the not-recommended list, even though Google may still attempt to parse it.
React SEO: where single-page apps lose content
React itself isn't the problem; the rendering mode is. On February 14, 2025 the React team deprecated Create React App for new apps and began recommending that projects start with a framework. A classic React single-page app sends an HTML file with an empty root element and builds everything in the browser. Google can usually render that. Crawlers that don't run JavaScript see a page with no text.
The fixes, in order of impact:
- Render public pages on the server or at build time. React points existing apps to Next.js or to React Router's framework mode. If a migration isn't possible yet, prerender the public routes at build time.
- Don't load indexable content in an Effect. React's documentation is blunt about it: Effects run only on the client, never during server rendering. A product description fetched in
useEffectis missing from the server HTML even when the rest of the page is server-rendered. Fetch it on the server and pass it down. - Use React 19's metadata support. Components can now render title, meta and link tags, and React hoists them into the head. That works with client-only apps, streaming server rendering and Server Components, but in a client-only app the tags still exist only after scripts run. The meta tags guide covers which ones Google reads.
- Use real links and real paths. Check the rendered HTML for anchor elements with
hrefvalues, and avoid routers that put the path after a#.
Next.js SEO: good defaults and four exceptions
In the App Router, pages and layouts are Server Components by default, and Next.js uses Client Components together with the server payload to prerender HTML. A component marked 'use client' still shows up in the first HTML response. On later navigations, Next.js renders on the client, but crawlers request each URL directly, so they get the server version. The Vercel and MERJ study also found that Google fully rendered content streamed through React Server Components.
The exceptions are where Next.js sites lose content:
- Components loaded with
ssr: false. Thenext/dynamicoption disables prerendering for that component, so its text is not in the HTML. Keep it for widgets, never for the main content. - Data fetched in
useEffectinside Client Components. Same rule as plain React: fetch in a Server Component and pass the result as props. - Streaming metadata. When
generateMetadatadepends on dynamic data, Next.js can send the page before the metadata is ready and append the tags to the body afterwards. It waits for the metadata only for "HTML-limited bots," detected by user agent. If AI crawlers matter to you, add their user agents with thehtmlLimitedBotsoption, or keep metadata static on pages you want quoted. - Missing records that return 200. Call
notFound()when a product or post doesn't exist. Next.js answers with a 404 and also injects a noindex robots tag, so an empty template never reaches the index.
Point three needs a closer look. The default list of HTML-limited bots in the Next.js source, checked on November 17, 2026, includes Bingbot, DuckDuckBot, Applebot, facebookexternalhit and several Google crawlers, but not GPTBot, OAI-SearchBot, ClaudeBot or PerplexityBot. A comment in that file explains why the list exists: such bots might explicitly check for metadata in the head. Googlebot runs JavaScript and reads the full DOM, so Google isn't the risk here.
Angular SEO, and what to do with AngularJS
Angular's documentation says it plainly: Angular ships all applications as client-side rendered by default. For a public site, that default is the first thing to change. Run ng add @angular/ssr on an existing project, or ng new --ssr on a new one. Angular then prerenders the whole app by default, and you can pick a mode per route in app.routes.server.ts:
import { RenderMode, ServerRoute } from '@angular/ssr';
export const serverRoutes: ServerRoute[] = [
{ path: '', renderMode: RenderMode.Prerender },
{ path: 'products/:id', renderMode: RenderMode.Server },
{ path: 'account', renderMode: RenderMode.Client },
{ path: '**', renderMode: RenderMode.Server },
];
Four details decide whether that server HTML is any good:
- Browser globals.
window,document,navigatorandlocationaren't available on the server. Code that needs them belongs inafterNextRenderorafterEveryRender, which run only in the browser. Angular also warns against rendering different content on server and client withisPlatformBrowserin templates, which causes hydration mismatches and layout shifts. - Status codes. A not-found component rendered with a 200 is a soft 404. The
RESPONSE_INITtoken lets you set the status code at runtime, so the component behind your wildcard route can answer with a 404. - Titles and descriptions. Give each route a
titlein the router config, which Angular applies when the route activates, and use theMetaservice for descriptions. - Links. Put
routerLinkon anchor elements and check the rendered HTML for a realhref. Google lists an anchor with only arouterLinkattribute among the formats it may fail to parse.
AngularJS is a separate case. Its support officially ended in January 2022, and many AngularJS apps route with # fragments, which Google can't rely on. Prerendering public routes buys time; a move to current Angular with server rendering is the lasting fix.
Can AI crawlers read JavaScript?
Mostly not, according to the largest public dataset. Vercel and MERJ analyzed crawler traffic across Vercel's network and published the results on December 17, 2024. In one month, GPTBot made 569 million requests, Claude's crawler 370 million, AppleBot 314 million and PerplexityBot 24.4 million, against 4.5 billion for Googlebot.
Their conclusion: "none of the major AI crawlers currently render JavaScript." ChatGPT's crawler did download JavaScript files on 11.50% of its requests, and Claude's on 23.84%, but neither executed them. The two exceptions were Gemini, which uses Googlebot's infrastructure, and AppleBot, which renders through a browser-based crawler.
The same data shows a second weakness: 34.82% of ChatGPT's crawler fetches and 34.16% of Claude's hit 404 pages, against 8.22% for Googlebot. Clean redirects and an up-to-date sitemap help these crawlers as much as rendering does.
Crawlers change, and log reports published in 2026 disagree about whether OpenAI's search crawler now runs scripts on some pages. The raw HTML is the only version every crawler reads, so treat it as the baseline. Google's AI Overviews are a different case, since they draw on Google Search and its renderer.
Two free Slibur tools cover the checks. The AI crawler checker linked above tells you whether robots.txt lets 16 crawlers in. The AEO checker reads one page's HTML the way most AI crawlers do, without running JavaScript: 300 words or more of main text passes, 80 to 299 is a warning, and less fails.
How to test what Google and AI crawlers see
Run these steps on one template of each type: home page, category, product or article, and anything built from an API.
- Compare raw and rendered HTML. Open view-source, or fetch the URL with
curl, then open the rendered HTML in Search Console's URL Inspection or the Rich Results Test. Check both for the title, meta description, canonical, robots tag, H1, main text, internal links and structured data. - Read the console. The same tools show loaded resources, JavaScript errors and the rendered DOM. To catch errors at scale, Google suggests logging them from a global error handler:
window.addEventListener('error', (e) => {
navigator.sendBeacon('/log-js-error', `${e.message} ${e.filename}:${e.lineno}`);
});
- Fetch with a crawler's user agent. A bot-detection layer, firewall or prerender service may answer bots differently from browsers. Request the page with the GPTBot or ClaudeBot user agent string and compare the HTML with what a browser gets.
- Read your server logs. Look for GPTBot, OAI-SearchBot, ClaudeBot and PerplexityBot: which URLs they request, which status codes they get, and whether they ever request your script files.
- Watch the Crawl stats report. It shows Googlebot and Web Rendering Service activity that client-side analytics miss.
- Re-test after each release. A new bundle, a router change or a framework upgrade can move content out of the server HTML without anyone noticing.
Slibur dataChatGPT, United States, 4 answers, November 17, 2026
What ChatGPT says about React, Next.js and Angular SEO
We asked ChatGPT four questions on November 17, 2026, from the United States: whether React is bad for SEO, how to make a Next.js site SEO friendly, how to do SEO for an Angular app, and whether ChatGPT can read websites that load their content with JavaScript. Here is what came back.
- React. It opened with "React isn't inherently bad for SEO" and put the blame on client-side rendering. It recommended SSR, static generation or prerendering for public pages, named Next.js and Astro as options, and said client-side rendering is usually fine for dashboards.
- Next.js. A long checklist built on the Metadata API, sitemap and robots files,
next/image, canonicals and structured data, with all seven citations pointing to nextjs.org. It said Next.js generates the head tags automatically, and it didn't mention streaming metadata orssr: false, the two exceptions above that are easiest to miss. - Angular. It started from the CSR default, recommended prerendering and SSR per route with
ng add @angular/ssr, and warned against touchingwindowanddocumentduring server rendering. Its own structured data example then built the script tag with the globaldocument, the pattern it had just warned about. - ChatGPT itself. "Sometimes, yes," it answered. It said that when it searches the web it may get only the initial page shell if content appears after scripts run, while its browser tools can render pages and interact with them.
The sources follow a clear pattern. Every citation in the four answers was official documentation: Google Search Central, nextjs.org, angular.dev, react.dev and OpenAI's help and developer pages. No agency blog, SEO tool or forum thread appeared. On framework questions, ChatGPT trusted the people who build the framework or run the crawler. A technical page that wants to be cited next to them has to add what the docs leave out, such as the metadata exception the Next.js answer skipped.
After the HTML: will AI assistants name you?
Server-rendered pages give every crawler something to read. They don't decide whether an assistant recommends your product when a buyer asks about your category; that depends on what the pages those assistants read say about you and your rivals.
Slibur measures that part. On paid plans it checks ChatGPT and Google AI Overviews every day, and Claude, Perplexity and Grok every week, with the questions your buyers ask, then shows which brands each one names, where yours appears and which websites each AI uses as sources. The 7-day free trial needs no credit card.
Frequently asked questions
Is JavaScript bad for SEO?
No. Google renders JavaScript pages with an up-to-date Chromium and indexes the rendered HTML. Trouble comes from how content is delivered: text that appears only after a click, links without an href, error routes that answer 200, or scripts blocked in robots.txt. Server-side or static rendering removes most of these risks and also serves crawlers that never run scripts, which includes most AI crawlers.
How long does Google take to render JavaScript?
Usually seconds, sometimes hours. In the Vercel and MERJ study of nextjs.org from April 2024, the median page was rendered 10 seconds after it was crawled and three in four within 26 seconds. One page in ten waited about 3 hours or more, and one in a hundred up to about 18 hours. Every HTML page that returned 200 in the sample was fully rendered.
Is Next.js good for SEO?
Yes, by default. Pages and layouts are Server Components, and Client Components are prerendered to HTML, so crawlers receive full pages. Four exceptions cause most problems: components loaded with ssr: false, data fetched in useEffect, metadata streamed into the body for bots outside Next.js's list of HTML-limited bots, and missing records that should call notFound() to return a 404.
Is React bad for SEO?
React isn't, but a client-only React app can be. A classic single-page app sends an empty root element and builds the page in the browser. Google can usually render that; crawlers that don't run JavaScript see no text. The React team deprecated Create React App for new apps in February 2025 and recommends starting with a framework that renders on the server or at build time.
Can ChatGPT read content loaded with JavaScript?
Its crawlers generally can't. In Vercel's December 2024 data, ChatGPT's crawler downloaded JavaScript files on 11.50% of its requests but executed none of them. ChatGPT's browser features can render a page for a user, but text that exists only after scripts run is the text most likely to be missed. Keep the main content in the HTML your server sends.
Is dynamic rendering still acceptable?
Google treats it as a workaround from the past, not a long-term fix, and recommends server-side rendering, static rendering or hydration. It isn't cloaking as long as bots and users get similar content. It also depends on spotting crawlers by user agent, so any bot missing from the list, such as a new AI crawler, receives the empty client-side version.
How do I check whether Google rendered my page?
Use URL Inspection in Search Console or the Rich Results Test. Both show the rendered HTML, the resources Google loaded and any JavaScript errors. Compare that rendered HTML with view-source: anything present only in the rendered version is invisible to crawlers that don't run scripts, and the AEO checker counts how much main text your server sends without JavaScript.

Raúl Díaz is the founder of Slibur, the tool that asks ChatGPT, Google AI Overviews, Claude, Perplexity and Grok the questions your customers ask and shows which brands they recommend. He writes about answer engine optimization from the data Slibur collects.