Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

CSR or SSR: Route-by-Route Facts for SEO & Speed

· 6 min read · Home Tech

In this article
  1. What Is CSR vs. SSR?
  2. How Rendering Affects SEO
  3. How Rendering Affects Speed
  4. Route-by-Route Decision Framework
  5. Common Problems and Misconceptions
  6. Costs and Complexity
  7. How to Choose (Practical Steps)
  8. Frequently Asked Questions

This article answers whether to use Client-Side Rendering (CSR) or Server-Side Rendering (SSR) for each route on your website, focusing on SEO and speed. The short answer: use SSR (or static generation) for public, content-heavy pages that need search visibility, and CSR for authenticated, app-like pages where SEO is irrelevant. Below, we break down the technical details, trade-offs, and decision factors route by route.

in t | Time to render (s) | s | 2 | 0
in d | Distance to server (ms) | ms | 50 | 0
out pace | Estimated SSR TTFB | ms | d + t*1000 | 0
out speed | Estimated CSR TTFB | ms | d | 0

What Is CSR vs. SSR?

Rendering refers to how your web app turns code into HTML that a browser can display. In Client-Side Rendering (CSR), the browser downloads a minimal HTML shell and a JavaScript bundle. The JavaScript runs on the user's device, fetches data, and builds the page content in the DOM. In Server-Side Rendering (SSR), the server executes your application logic, fetches data, and sends fully-formed HTML to the browser. The browser then hydrates (attaches event listeners) to make it interactive.

There's also Static Site Generation (SSG), a variant where HTML is pre-rendered at build time and served as static files. SSG is often the best of both worlds for content that doesn't change per user.

How Rendering Affects SEO

Search engine crawlers (Google, Bing) execute JavaScript, but not equally well or quickly. Google's crawler uses a two-wave indexing system: it first fetches the raw HTML, then queues the page for rendering if JavaScript is needed. This delay can push your content into a slower indexing queue, especially for new or low-authority pages. If your JavaScript fails to execute (due to a network error, a bot-blocking rule, or a heavy bundle), the crawler sees an empty page.

For content that must be indexed—blog posts, product pages, category pages—SSR or SSG ensures the HTML contains the actual text and links. CSR pages rely on the crawler's ability to run JS, which is a risk you don't need to take for public content.

How Rendering Affects Speed

Speed is a ranking factor and a user experience metric. The key metrics are:

  • Time to First Byte (TTFB): time until the server sends the first byte of the response. SSR often has higher TTFB because the server must render the page before sending it. CSR has low TTFB (the shell is small) but high Time to Interactive (TTI) because the browser must download and execute JS.
  • First Contentful Paint (FCP): when the first text/image appears. SSR wins—the HTML is already there. CSR may show a blank screen until JS executes.
  • Largest Contentful Paint (LCP): when the main content is visible. SSR/SSG wins for content pages. CSR can win for app pages if you use code splitting and lazy loading, but it's harder.

For users on slow devices or networks, CSR can be painfully slow because all rendering happens on their device. SSR shifts that work to the server, which is typically faster and closer to the data.

Route-by-Route Decision Framework

Not every route needs the same treatment. Here's a practical breakdown:

  • Public marketing pages, blog posts, product listings, documentation: Use SSR or SSG. These need SEO and fast first paint. Example: an e-commerce product page—you want Google to index it and users to see it instantly.
  • User dashboards, admin panels, logged-in areas: Use CSR. These are private, often app-like, and SEO is irrelevant. Example: a user's order history—no one else needs to index it, and the user expects interactivity.
  • Hybrid pages (e.g., a product page with a personalized recommendation section): Use SSR for the main content, then hydrate and fetch user-specific data on the client. This is often called “islands” or “progressive hydration.”
  • Pages with frequently changing content: SSR is better than SSG because SSG would require rebuilding the entire site. Example: a live auction page.
  • Pages with highly dynamic, user-specific data: CSR is simpler and avoids server load. Example: a real-time collaborative editor.

Common Problems and Misconceptions

One misconception is that SSR always hurts performance. In reality, SSR can be faster than CSR if your server is fast and you cache rendered HTML. The downside is server load and complexity—you now have a Node.js server (or similar) that must render every request. Without caching, SSR can be slower than CSR on high-traffic sites.

Another issue is hydration mismatch: the server-rendered HTML doesn't match what the client renders, causing flicker or broken interactivity. This often happens when you use browser-only APIs (like window) during render. The fix is to ensure your code runs only on the client for those parts.

Also, don't assume CSR is automatically bad for SEO. If your site is a single-page app with a service worker and pre-rendering, it can be indexed. But it's fragile and requires extra tooling. For most teams, SSR/SSG is more reliable.

Costs and Complexity

SSR adds server-side infrastructure. You need a Node.js server (or a serverless function) that can run your app. This increases hosting costs and operational complexity. You also need to handle caching, load balancing, and possibly streaming. SSG is cheaper—you can host static files on a CDN—but you need a build step and a way to rebuild when content changes.

CSR is the cheapest to deploy (static files on a CDN) but shifts the cost to the user's device and can hurt SEO. For a small site, CSR might be fine. For a large e-commerce site, SSR is worth the cost.

How to Choose (Practical Steps)

Here's a step-by-step approach to decide for each route:

  1. List all your routes and classify them: public vs. private, content-heavy vs. app-like.
  2. For public routes, ask: “Do I need this page to rank on Google?” If yes, use SSR or SSG.
  3. For private routes, ask: “Does the user need instant interactivity?” If yes, use CSR.
  4. For routes that are public but have personalized sections, use SSR for the static parts and client-side fetch for the personalized parts.
  5. Test with Lighthouse and WebPageTest. Measure TTFB, FCP, LCP, and TTI for both approaches on real devices.
  6. Consider your team's skill set. If you're a React team, Next.js or Remix gives you SSR/SSG easily. If you're a Vue team, Nuxt. Don't add a new framework just for one route.

Frequently Asked Questions

Does Google index CSR pages?

Yes, Google can index CSR pages because it executes JavaScript. However, the process is slower and less reliable than SSR. Google's crawler may queue your page for rendering, which can delay indexing. If your JS bundle is large or fails, your page may not be indexed at all.

Can I mix CSR and SSR on the same site?

Absolutely. This is called “hybrid rendering.” You can use SSR for public routes and CSR for private routes. Many frameworks (Next.js, Nuxt) support per-route rendering modes. You can also use client-side hydration for interactive components on an SSR page.

Is SSR always faster than CSR?

No. SSR can be slower if your server is slow or under load. The server must render HTML before sending it, which adds TTFB. CSR can be faster for interactivity after the initial load because the server isn't involved. The best choice depends on your specific route and infrastructure.

What is hydration and why does it matter?

Hydration is the process where the browser attaches JavaScript event listeners to server-rendered HTML. Without hydration, the page looks right but isn't interactive. Hydration can be slow if you have many components. Techniques like partial hydration (only hydrating visible components) can improve speed.

Does SSG count as SSR?

No, SSG is different. SSG pre-renders HTML at build time, so it's static. SSR renders on each request. SSG is faster (no server work per request) but requires a rebuild when content changes. For content that doesn't change often, SSG is often the best choice for SEO and speed.