Table of contents
If your website is built with React but Google sees an empty page when it crawls it, you have an SEO problem no amount of keywords can fix. Server-side rendering (SSR) solves this by sending fully rendered HTML to the browser and to search engine bots. In this guide we will look at why it matters and how to set it up properly in Next.js.
What is server-side rendering?
With a plain client-side React app, the server sends an almost empty HTML file and a big JavaScript bundle. The browser then builds the page. With SSR, the server builds the HTML first, so the content is already there when the response arrives.
Next.js gives you a few ways to do this, and it helps to know the difference:
SSG (static generation): pages are built once at build time. Fastest option.
ISR (incremental static regeneration): static pages that refresh in the background after a set time.
SSR (dynamic rendering): pages are rendered on every request. Best for data that changes constantly.
Why SSR helps your SEO
Google can run JavaScript, but it does so in a second wave, which can delay indexing. Other crawlers and social media preview bots often do not run JavaScript at all. Server-rendered HTML avoids all of these problems.
Faster first paint
Users see content sooner, which improves Core Web Vitals like Largest Contentful Paint (LCP). Google uses these signals when ranking pages.
Reliable social previews
WhatsApp, LinkedIn and Facebook read your Open Graph tags from the raw HTML. If those tags are added by JavaScript, the preview comes out blank.
If a crawler has to run your JavaScript to find your content, you are making its job harder than it needs to be.
Setting up metadata the right way
In the App Router, use generateMetadata so every page gets its own title, description and canonical URL. Here is a simple example for a blog page:
export async function generateMetadata({ params }) {
const { id } = await params;
const blog = await getBlogById(id);
return {
title: blog.title,
description: blog.excerpt,
alternates: { canonical: "/blog/" + blog.slug },
};
}Keep titles under 60 characters and descriptions under 160 so they are not cut off in search results.
A quick SEO checklist
Before you publish any page, run through this list:
One
h1per page, and headings in a logical orderUnique title and meta description
Canonical URL set
Open Graph and Twitter card tags added
Structured data (JSON-LD) for articles
Descriptive alt text on every image
Clean, readable URLs
Common mistakes to avoid
Adding
"use client"to a page that does not need it, which moves rendering to the browserFetching data in
useEffectinstead of on the serverChanging a published URL without a 301 redirect
Using the same description on every page
Final thoughts
SSR is not magic, but it removes a lot of friction between your content and the search engines. Pair it with good metadata, fast images and useful writing, and you have a solid base. Want to see more guides like this? Browse our blog, or check the official Next.js documentation for the details.
- #Next.js
- #SEO
- #SRR




