“Should we use SSG or SSR?” is one of the most common architecture questions in web development, and one of the most misunderstood. The honest answer is that both are excellent for SEO, and both beat pure client-side rendering for any page that needs to be found. The real differences lie in speed, freshness, scale, cost, and operational risk. This guide explains how each approach works, what search engines and AI crawlers actually see, where each wins, and how to choose.
The Short Answer
- Choose SSG when content changes infrequently and is the same for every visitor: blogs, documentation, marketing pages, landing pages, portfolios. It’s typically the fastest, cheapest, and most robust option.
- Choose SSR when content is dynamic, personalized, or changes constantly: large catalogs with live inventory, news, search results, user-specific pages, anything where stale HTML would hurt.
- Choose a hybrid (increasingly the norm) when your site has both kinds of pages. Modern frameworks let you pick a rendering strategy per route, so you rarely need to commit the whole site to one model.
- Avoid pure client-side rendering (CSR) for any page that must rank or be cited by AI systems.
Quick Definitions
Static Site Generation (SSG): pages are rendered to HTML at build time. The resulting files are stored and served from a CDN. Every visitor gets the same pre-built HTML.
Server-Side Rendering (SSR): pages are rendered to HTML on the server at request time. Each request can produce different output based on data, cookies, location, or other context.
Related terms you’ll encounter:
- Incremental Static Regeneration (ISR) / revalidation: static pages that are rebuilt in the background on a schedule or on demand, so you get static speed with fresher content.
- Streaming SSR: the server sends HTML in chunks as it’s ready, so users (and crawlers) see content sooner.
- Hydration: attaching JavaScript interactivity to server-rendered HTML in the browser.
- Islands / partial hydration: only interactive components load JavaScript, while the rest stays plain HTML.
- React Server Components (RSC) and similar: components that run only on the server and ship little or no client JavaScript.
- CSR: the server sends a mostly empty HTML shell, and JavaScript builds the page in the browser.
How Search Engines and AI Crawlers See Your Pages
This is the core of the SEO question, so it’s worth getting precise.
Googlebot
Googlebot can render JavaScript, so “can Google index my React app?” is no longer the right question. But rendering is a separate, deferred step: Google fetches the raw HTML, then queues the page for rendering with a headless Chromium, and may process the rendered result later. For most pages the delay is small, but it adds uncertainty, consumes resources, and creates failure modes (blocked scripts, errors, timeouts, content that only appears after user interaction). Google’s own documentation describes JavaScript as workable but recommends making sure important content is available reliably, and has moved away from endorsing “dynamic rendering” (serving bots a prerendered version) as a long-term solution, treating it as a workaround.
With SSG or SSR, the important content, links, titles, canonical tags, and structured data are already in the initial HTML. Google doesn’t need to wait for rendering to understand the page.
AI Crawlers and Assistants
This is where the stakes have risen. A widely cited analysis by Vercel and MERJ (published December 2024, so treat it as a snapshot rather than a permanent truth) found that major AI crawlers, including OpenAI’s GPTBot and Anthropic’s ClaudeBot, fetch JavaScript files but don’t execute them. Google’s Gemini is the exception because it leverages Googlebot’s rendering infrastructure. The practical implication: content that only appears after client-side JavaScript runs may be invisible to many AI systems that retrieve pages directly, even when Google ranks the page well.
Both SSG and SSR put your content in the initial HTML, so both serve these crawlers equally well. This is one of the strongest modern arguments for server-first rendering, and it’s rendering-agnostic between SSG and SSR.
Other Search Engines and Social Bots
Bing, DuckDuckGo, Yandex, Baidu, and social-preview scrapers (for Open Graph cards) vary in their JavaScript handling. Server-delivered HTML is the most reliable common denominator.
Head-to-Head: SSG vs. SSR on the Factors That Affect SEO
| Factor | SSG | SSR |
|---|---|---|
| Content in initial HTML | Yes | Yes |
| Crawlability for Google & AI bots | Excellent | Excellent |
| Time to First Byte (TTFB) | Typically lowest (CDN-served files) | Depends on server work; can be fast with caching/edge, slower if computation or database calls are heavy |
| LCP potential | Excellent | Good to excellent; hinges on TTFB and streaming |
| INP / interactivity | Depends on JavaScript shipped, not on SSG vs SSR | Same |
| Freshness | Stale until rebuild/revalidation | Always current (unless cached) |
| Personalization | Hard (needs client-side layer) | Natural |
| Scalability under traffic spikes | Excellent, trivial to scale | Requires capacity planning, caching, or edge infrastructure |
| Build time at large scale | Can become long for 100K+ pages | No build-time page generation |
| Infrastructure cost | Lowest | Higher (compute per request) |
| Operational risk | Low (fewer moving parts, smaller attack surface) | Higher (server errors, timeouts, cold starts) |
| Reliability for bots | Very high | High, but server errors/timeouts are possible |
1. Indexing and Content Visibility
Tie. Both deliver complete HTML. Where SSR can lose is reliability: if your server times out, returns 5xx errors, or throttles during a crawl surge, bots see failures. Where SSG can lose is stale content: a price, stock status, or headline that changed but hasn’t been rebuilt.
2. Core Web Vitals
Google’s thresholds (LCP ≤ 2.5s, INP ≤ 200ms, CLS ≤ 0.1 at the 75th percentile of real-user data) apply regardless of rendering method. Rendering strategy influences them in specific ways:
- LCP: SSG usually has the advantage because HTML comes straight from a CDN edge cache with minimal TTFB. SSR can match it if responses are cached at the edge or computed quickly, and streaming can improve perceived speed by sending the shell and critical content early.
- INP: this is determined mostly by how much JavaScript you ship and how heavy hydration is, not by SSG vs SSR. A static page that hydrates a huge component tree can have poor INP; an SSR page with islands or server components can have excellent INP.
- CLS: controlled by layout discipline (reserved image dimensions, font handling, ad slots), not rendering mode.
One small academic comparison of Next.js and Astro across SSG, SSR, and CSR found Next.js had an edge on LCP and Astro on Total Blocking Time, with SSG generally giving slightly better speed indicators. Take such benchmarks as illustrative: results depend heavily on implementation, page weight, and hosting. As one framework-focused analysis put it, a poorly optimized Next.js app can lose to a well-structured Astro or Nuxt site; the framework and rendering label matter less than JavaScript payload, hydration strategy, and delivery infrastructure.
3. Freshness
Search engines reward accurate, up-to-date information on time-sensitive queries, and users abandon pages that show wrong prices or availability. SSR delivers current data on every request. SSG needs one of:
- Rebuilds triggered by content changes (via CMS webhooks),
- ISR / revalidation (time-based or on-demand), or
- Client-side fetches for volatile bits, noting that anything fetched client-side may not be seen by crawlers that don’t render JavaScript.
For many sites, on-demand revalidation delivers near-SSR freshness with SSG performance.
4. Scale and Crawl Efficiency
Large sites (hundreds of thousands or millions of URLs) face practical limits. Full-site static builds can take a long time, which is why ISR, on-demand generation, or SSR with caching are often more practical at scale. Meanwhile, search crawlers and AI bots can generate heavy traffic: Vercel’s data showed AI crawlers generating hundreds of millions of requests per month each on its network, and often hitting many 404s. SSG shrugs this off; SSR needs caching and rate-handling so bot spikes don’t degrade user experience. Google’s crawl documentation also recommends proper 503/429 responses with Retry-After when a server is overloaded, rather than letting it fall over.
5. Structured Data, Metadata, and Links
Both approaches can emit titles, meta descriptions, canonicals, hreflang, JSON-LD, Open Graph tags, and crawlable <a href> links directly in the HTML. Verify these exist in the raw HTML response, not just after hydration. SSR makes dynamic metadata (per-product titles, localized tags) straightforward; with SSG you generate them at build time, which is fine as long as the data source is stable or regenerated when it changes.
6. Personalization and Duplicate Content Risks
SSR makes it easy to vary HTML by user, location, or device, which is powerful but dangerous for SEO and caching: bots may see inconsistent or geolocated versions, and personalization can fragment your cache. Best practice is to keep the indexable HTML consistent and canonical, and layer personalization afterward (client-side or via edge logic) where it doesn’t change what search engines should index.
7. Cost, Complexity, and Reliability
SSG is cheap and resilient: static files on a CDN have almost nothing to break. SSR adds servers or serverless functions, cold starts, database dependencies, and monitoring needs. For many content sites, SSG’s lower cost and simplicity are decisive. For application-like sites, SSR’s flexibility justifies the overhead.
The Hybrid Reality in 2026
Most modern meta-frameworks support route-level choice. Industry guidance in 2026 converges on a pattern: SSG for stable pages, SSR or ISR for dynamic ones, and CSR only for sections that don’t need to rank (dashboards, account areas, widgets).
Key techniques:
- ISR / on-demand revalidation: static pages that update when content changes or on a timer. Ideal for catalogs, news archives, and large blogs.
- Streaming SSR: improves perceived speed by flushing the shell and early content immediately. Make sure SEO-critical elements (title, canonical, main content) are included in the streamed HTML and aren’t dependent on late client-side steps.
- Edge rendering and caching: running SSR close to users or caching rendered output at the CDN narrows the speed gap with SSG. Use sensible
Cache-Control,stale-while-revalidate, andVaryheaders. - Islands and server components: ship less JavaScript so both SSG and SSR pages stay responsive. Astro popularized the islands approach; React’s server components and similar patterns in other frameworks reduce client bundles.
- Partial prerendering and similar hybrids: serve a static shell with dynamic holes streamed in, offering static-like speed with dynamic content. Framework support is evolving, so check current docs and test behavior with crawlers.
Choosing by Site Type
| Site type | Recommended approach | Why |
|---|---|---|
| Blog, magazine (moderate size) | SSG, with on-demand revalidation | Fast, cheap, stable content |
| Documentation, knowledge base | SSG | Static by nature, great for AI citation |
| Marketing / landing pages | SSG | Speed and conversion; easy A/B at edge |
| Small business / portfolio | SSG | Simplicity and reliability |
| Ecommerce category & product pages | ISR/SSG + SSR for inventory/price where needed | Balance freshness with speed at scale |
| News and live content | SSR or short-interval ISR, with edge caching | Freshness matters |
| Marketplaces, classifieds, listings | SSR/ISR hybrid | Huge, frequently changing inventory |
| Search results, filtered/faceted pages | SSR (with careful indexation rules) | Dynamic; control crawlable combinations |
| Logged-in dashboards, account pages | CSR or SSR (noindex) | Not meant to rank |
| Multi-region sites with localized content | SSG per locale or SSR with strict hreflang | Consistency across language versions |
Framework Notes (Current as of Late 2026)
- Next.js (App Router, with RSC) supports SSG, SSR, streaming, and ISR/revalidation at route level, and is often described as the most complete option for React. Its own documentation describes static generation as typically the best-performing choice for SEO where applicable.
- Astro is widely praised for content-focused SEO thanks to static output by default and minimal JavaScript via islands, with on-demand rendering available when needed.
- Nuxt (Vue) supports SSR, static generation, and hybrid route rules.
- SvelteKit, Remix / React Router, SolidStart offer server-first rendering with flexible strategies.
- Traditional static generators (Hugo, Eleventy, Jekyll) remain excellent for pure static sites and very fast builds.
Version numbers and features change quickly; always check current documentation before deciding.
Common Pitfalls (and How to Avoid Them)
- Assuming “Google can render JavaScript” means you’re safe. Google can, but AI crawlers often can’t, and rendering delays add risk. Put essential content in initial HTML.
- Content only after hydration or interaction. Tabs, accordions, “read more,” or lazy-loaded text that requires clicking or scrolling logic may not be seen. Ensure it’s in the DOM on load.
- Hydration mismatches. Differences between server and client output cause errors and flicker, and can degrade INP and CLS.
- Client-side meta tags and canonicals. Setting titles,
noindex, or canonicals only in browser JavaScript is unreliable. Emit them server-side. - Soft 404s in SSR. Returning 200 for “not found” pages wastes crawl budget and confuses indexing. Return real 404/410 codes.
- Over-personalizing indexable pages. Varying HTML by cookie or IP can produce inconsistent indexing. Keep the canonical version stable.
- Cache misconfiguration. Unintended
Vary: Cookie, private caching, or no CDN caching makes SSR slow and fragile; the opposite problem, caching personalized or error responses publicly, can leak content or serve stale errors. - Stale SSG. Forgetting to trigger rebuilds or revalidation after content changes leaves outdated pages indexed.
- Huge builds. Trying to statically generate everything on massive sites leads to slow deploys; use incremental generation or on-demand rendering.
- Blocking resources. Don’t block CSS/JS in
robots.txt; Google needs them to render and evaluate pages. - Heavy JavaScript on “static” pages. SSG doesn’t guarantee good INP if you hydrate everything.
- Relying on dynamic-rendering workarounds. Serving bots a special prerendered version adds complexity and risk of cloaking-like inconsistencies; Google no longer promotes it as a recommended approach.
- Ignoring server errors during crawls. SSR timeouts and 5xx spikes during bot surges can depress crawl rates and visibility.
How to Test What Crawlers Actually See
- View raw HTML: use “View Source” or
curlto confirm that the main content, headings, links, canonical, meta robots, and JSON-LD appear without JavaScript. - Compare with the rendered DOM: in DevTools, inspect the rendered version; large differences signal dependence on JavaScript.
- Use Search Console’s URL Inspection: check Google’s rendered HTML and screenshot, resource loading errors, and indexing status.
- Disable JavaScript in the browser and navigate key pages and links.
- Check logs: confirm what Googlebot and AI crawlers (GPTBot, OAI-SearchBot, ClaudeBot, PerplexityBot, and others) request, the status codes they receive, and response times.
- Monitor field Core Web Vitals: CrUX and real-user monitoring by template, split by mobile and desktop.
- Crawl the site with a tool that can run in both HTML-only and JavaScript-rendering modes and compare.
- Test caching behavior: verify headers, hit rates, and that bots receive cacheable, consistent responses.
Migration Checklist: Moving Away From CSR (or Between Models)
- Inventory URLs by template and business value; decide which need to rank.
- Choose per-template strategy (SSG, ISR, SSR) based on freshness and personalization needs.
- Preserve URLs; if they must change, implement 301 redirects and update sitemaps and internal links.
- Ensure titles, canonicals, hreflang, structured data, and status codes are server-rendered.
- Reduce client JavaScript while you’re at it: partial hydration, code splitting, third-party audit.
- Set caching and revalidation rules; add on-demand revalidation hooks to your CMS.
- Stage and crawl before launch; compare raw HTML to the old rendered output.
- Monitor Search Console (coverage, indexing, Core Web Vitals) and server logs closely after release; expect short-term fluctuation and don’t judge during rollout.
Myths Worth Retiring
- “SSR is always better for SEO than SSG.” No. SSG often matches or beats SSR on speed and reliability; SSR’s edge is freshness and personalization.
- “SSG can’t handle dynamic content.” It can, through revalidation, on-demand regeneration, and carefully scoped client-side fetches.
- “Google can’t index JavaScript.” It can, with delays and caveats, but other crawlers may not.
- “Rendering strategy is a ranking factor.” It isn’t directly. It affects what crawlers can see, how fast pages load, and how reliable delivery is, which influence indexing and user experience.
- “Use bigger frameworks for better SEO.” SEO outcomes depend on content quality, structure, and performance discipline more than on a brand name.
What to Watch Next
- Better hybrids: partial prerendering, server components, and edge runtimes continue to blur the line between static and dynamic.
- Agent-readiness: as AI agents browse and act on websites, server-rendered semantic HTML and clean structure become more valuable.
- Crawler capability changes: AI crawlers may add rendering over time, but planning around today’s limits is safer. Re-check crawler documentation periodically.
- Search interface shifts: with AI Overviews and AI Mode changing click patterns, being accurately retrievable matters as much as ranking.
The Bottom Line
For SEO, the decision isn’t “SSG good, SSR bad” or the reverse. Both put real content in the initial HTML, which is the thing that matters most to Google and to AI crawlers alike. Pick SSG when you can, for its speed, resilience, and low cost; pick SSR (or ISR) when freshness or personalization demands it; combine them route by route; and relentlessly limit JavaScript. Then verify your assumptions by looking at the raw HTML, the field data, and the server logs. The best rendering strategy is the one that reliably gets fast, complete, accurate pages to every kind of visitor, human or machine.
This guide reflects publicly reported industry research, framework documentation, and established practice as of October 2026. Benchmarks, crawler behavior studies, and framework capabilities change quickly and vary by implementation; verify against current Google Search Central documentation, your framework’s docs, and your own field data and server logs before making architecture decisions.