“If our site is built with Next.js, will SEO be okay?”
Clients ask us this every time we suggest building their site with Next.js.
Next.js is a framework that is very strong for SEO. With the right setup, it can perform better in search than a WordPress site. However, if it is set up wrongly, search engines may not index (register) your pages at all.
This article explains SEO for Next.js, from the basics to how to put it into practice.
Why React on Its Own Is Weak for SEO
The Limits of Client-Side Rendering (CSR)
First, it is a fact that a site built with React alone is weak for SEO.
By default, React uses “client-side rendering (CSR).” A page is displayed in these steps:
- The browser receives an almost empty HTML file from the server
- The browser downloads the JavaScript files
- The JavaScript runs, and the page content is drawn in the browser

The problem is that search engine crawlers (robots that visit and read websites) may not fully support running JavaScript.
Google’s crawler has become better at running JavaScript in recent years. Even so, processing can take time, and some content may not be read. Search engines other than Google (such as Bing’s crawler, which Yahoo! also uses) have even more limited JavaScript support.
Next.js Solves This Problem
Next.js fixes React’s SEO weakness with SSR (server-side rendering) and SSG (static site generation).
Both methods give search engines finished HTML, so crawlers can reliably read the content.
How to Improve SEO with React Alone, Without Next.js
You may already have a site running on React and not be ready to decide on a move to Next.js. Here are three measures you can take while staying on React alone, in order of impact.
1. Output Different Meta Tags for Each Page
The first problem on a React-only site is usually that every page has the same title and description. When the pages appear in search results, people cannot tell them apart, so they do not click. This is the cheapest thing to fix.
With React 19 or later, you can write title and meta directly inside a component, and React moves them into the head element automatically. No extra library is needed.
// React 19 or later
function ServicePage() {
return (
<>
<title>Website Development | Company Name</title>
<meta name="description" content="A description summarizing this page's content" />
{/* Page content */}
</>
);
}
If you are on React 18 or earlier, you can do the same with a library such as react-helmet-async.
Meta tags added this way only enter the head element after JavaScript runs in the browser. Google runs JavaScript, so it can read them, but the crawlers that social networks use to fetch OGP do not run JavaScript. This is why no title or image appears when your page is shared on X or Facebook. If you also want traffic from social media, you need to go on to the next step, prerendering.
2. Return Finished HTML with Prerendering
Prerendering means generating the HTML for each page in advance and returning that HTML to crawlers. It fills the gap left by CSR without rewriting your React code.
- Generate at build time: The HTML for each page is written out when the site is built. Suited to sites with few pages whose content does not change much
- Generate on access: Only visits from crawlers are detected, and they receive the pre-generated HTML. Use this if you have many pages or the content changes often
The drawback of prerendering is that you end up running two setups. Regular users get CSR and crawlers get pre-generated HTML, and you have to keep it that way. Every time you add a page, you need to configure and test it.
3. When to Move to Next.js
Measures 1 and 2 only treat the symptoms. If any of the following applies to you, considering a migration will end up costing less time and money than piling on more workarounds.
| Situation | Decision |
|---|---|
| A few dozen pages, and the number will not grow much | React alone plus meta tag setup is enough |
| You want traffic from social media shares | Prerendering or more is needed |
| Pages keep being added, such as blog posts or case studies | Consider moving to Next.js |
| You want search traffic to be a pillar of your business | Moving to Next.js is recommended |
SSR vs. SSG vs. ISR: Understanding Them from an SEO Perspective
SSR (Server-Side Rendering)
SSR (Server Side Rendering) is a method where the server generates HTML and returns it every time a user visits.
- How it works: Request → server generates HTML → returned to the user
- Effect on SEO: Strong for SEO because crawlers receive finished HTML
- Best for: Pages whose content changes for each user, and pages that need real-time information
SSG (Static Site Generation)
SSG (Static Site Generation) is a method where HTML is generated in advance at build time (the stage where the site is prepared for release).
- How it works: HTML generated at build time → placed on a CDN → delivered to users
- Effect on SEO: Finished HTML is served quickly from a CDN, which makes it the best option for SEO
- Best for: Pages that are rarely updated, such as company profiles, service pages and blog posts
ISR (Incremental Static Regeneration)
ISR (Incremental Static Regeneration) is an evolved version of SSG. It automatically regenerates static pages at set intervals.
- How it works: HTML generated at build time → regenerated in the background at the interval you set → replaced with the latest HTML
- Effect on SEO: Keeps the speed benefit of SSG while keeping information up to date
- Best for: Pages that are updated regularly, such as blog posts, product information and news

Recommended Choices for SEO
| Page type | Recommended method | Reason |
|---|---|---|
| Home page | SSG or ISR | Fast display matters. With ISR, the latest information can also be shown |
| Company profile / service pages | SSG | Rarely updated, so speed comes first |
| Blog posts | SSG + ISR | Generated at build time and replaced with ISR when updated |
| News list | ISR | Regenerated each time a new post is added |
| Search results page | SSR | Generated dynamically based on what the user enters |
| My page (account page) | CSR | No SEO needed. Dynamic content shown after the user logs in |
For a small or medium-sized company’s corporate site, the setup with the best balance of speed, SEO and day-to-day running is SSG for content pages, combined with ISR only for the parts that are updated often.
Setting Up Meta Tags and OGP in Next.js
Setting the Title Tag and Description
The title and description shown in search results are the most basic elements of SEO.
With the App Router in Next.js, you can set them simply with a metadata object.
// app/page.tsx
export const metadata = {
title: "Company Name | A title that sums up your service",
description: "Summarize the page in 120 characters or fewer. Write a description that makes searchers want to click",
};
With the Pages Router, use next/head.
import Head from "next/head";
export default function Page() {
return (
<>
<Head>
<title>Company Name | Title</title>
<meta name="description" content="Page description" />
</Head>
{/* Page content */}
</>
);
}
Set Unique Meta Tags for Each Page
What matters for SEO is not using the same title and description on every page.
Set unique meta tags that match the content of each page. For blog posts, you can set the post title and summary dynamically using data fetched from your CMS.
Generate Meta Tags for Post Pages Dynamically
For content where the number of pages changes, such as a blog or case studies, you cannot write meta tags by hand for each page. With the App Router, use generateMetadata to feed the content fetched from your CMS straight into the title and description.
// app/blog/[slug]/page.tsx
export async function generateMetadata({ params }) {
const post = await getPost(params.slug);
return {
title: post.title,
description: post.excerpt,
openGraph: {
title: post.title,
description: post.excerpt,
images: [post.eyecatch],
},
};
}
No setup work is needed as more posts are added. This setup is also worth having because it keeps meta tags from being left empty as the site is run day to day.
Do You Need the next-seo Library?
If you look up SEO for Next.js, you will often see a library called next-seo. In short, if you are building a new site with the App Router, you basically do not need it.
next-seo became popular in the Pages Router era as a way to make managing meta tags easier. Back then, you had to list tags in next/head on each page, and the library reduced that work. In today’s App Router, the metadata and generateMetadata features described above do the same job as standard.
| Situation | Choice |
|---|---|
| Building a new site with the App Router | Use the standard Metadata API (next-seo is not needed) |
| Running an existing Pages Router site | next-seo is useful. No need to force its removal |
| Migrating from the Pages Router to the App Router | Switch each page to the standard API as you migrate it |
Adding a library also means taking on running costs: keeping up with its updates and with new versions of Next.js itself. Where the standard features are enough, choosing them will hold up better over time.
Do you have questions about building a site with Next.js or about SEO?
Web制作・システム開発は
First CHにお任せください
「こんなWebサイトが欲しい」「このシステムは実現できる?」——
現役エンジニアが直接お話を伺い、最適な進め方をご提案します。
「まだ構想段階」「費用感だけ知りたい」というご相談も歓迎です。
OGP (Social Sharing Settings): Getting the Most Traffic from Social Media
What Is OGP?
OGP (Open Graph Protocol) is a way to control the image, title and description shown when your site’s URL is shared on social media.
When you share a URL on Facebook, X (formerly Twitter), LINE and similar services, a card-style preview appears. OGP controls what this preview contains.
To check how it looks after setup, you can use our free OGP Checker (First CH Tools). Just enter a URL to preview the card shown when it is shared.
Setting Up OGP in Next.js
With the App Router, you can set OGP in the same metadata object.
export const metadata = {
title: "Page title",
description: "Page description",
openGraph: {
title: "Title for social media shares",
description: "Description for social media shares",
images: ["/og-image.jpg"],
type: "website",
url: "https://example.com/page",
},
twitter: {
card: "summary_large_image",
title: "Title for X (formerly Twitter)",
description: "Description for X (formerly Twitter)",
images: ["/og-image.jpg"],
},
};
Tips for OGP Images
The OGP image has a big effect on how your page looks on social media. Keep the following points in mind.
- Recommended size: 1200 x 630px
- File format: JPEG or PNG
- File size: 1MB or less
- If you put text in the image, center it (because some social networks crop the image)
Optimizing for Crawlers: Sitemaps, robots.txt and Structured Data
Generating a Sitemap Automatically
A sitemap (sitemap.xml) is a file that tells search engines which pages are on your site.
In Next.js (App Router), you can generate a sitemap automatically by creating an app/sitemap.ts file.
// app/sitemap.ts
export default function sitemap() {
return [
{ url: "https://example.com", lastModified: new Date() },
{ url: "https://example.com/about", lastModified: new Date() },
{ url: "https://example.com/blog", lastModified: new Date() },
// You can also fetch the post list from your CMS and generate this dynamically
];
}
In WordPress, a plugin can generate it automatically, so you do not have to think about it. In Next.js, you need to set it up yourself. Be sure to add it to your pre-launch checklist.
Setting Up robots.txt
robots.txt is a file that tells search engine crawlers “you may crawl this page” or “please do not crawl this page.”
// app/robots.ts
export default function robots() {
return {
rules: { userAgent: "*", allow: "/", disallow: "/admin/" },
sitemap: "https://example.com/sitemap.xml",
};
}
Structured Data: Improving How You Appear in Search Results
What Is Structured Data?
Structured data is a way to tell search engines what the content of a page means.
For example, you describe information such as “this is company information,” “this is a blog post” or “this is an FAQ” in JSON-LD format.
When it is set up correctly, rich snippets (results that stand out more than usual) may appear in Google search results.
Adding Structured Data in Next.js
In Next.js, you embed JSON-LD using a <script> tag.
export default function BlogPost({ post }) {
const jsonLd = {
"@context": "https://schema.org",
"@type": "Article",
headline: post.title,
datePublished: post.publishedAt,
author: { "@type": "Organization", name: "First CH LLC" },
};
return (
<>
<script
type="application/ld+json"
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
/>
{/* Post content */}
</>
);
}
Structured Data a Small Business Site Should Set Up
You do not need to set up every type of structured data. The high-priority types for a corporate site are these:
| Type | Use | Priority |
|---|---|---|
| Organization | Company information (name, logo, contact details) | High |
| LocalBusiness | Address and business hours of a shop or office | High (if you have a physical location) |
| BreadcrumbList | Breadcrumb navigation | High |
| Article | Blog posts | Medium |
| FAQ | Frequently asked questions | Medium |
| WebSite | Information about the whole site | Low (as a basic setting) |
You can generate JSON-LD for Organization, LocalBusiness, FAQ and more by filling in a form in our free JSON-LD Generator (First CH Tools). We recommend it because it prevents the syntax mistakes that happen when writing by hand.
Image Optimization: Using Next.js’s Built-In Features
Using the next/image Component
Next.js comes with the next/image component as standard, which optimizes images automatically.
Its main features are:
- Automatic resizing: Optimizes images to match the display size
- WebP/AVIF conversion: Automatically converts images to modern formats
- Lazy loading: Loads images when they come into view on the screen
- Preventing CLS (layout shift): Reserves the image’s display area in advance
These directly improve Core Web Vitals, which are an SEO ranking factor.
Do Not Forget the alt Attribute
An image’s alt attribute (alternative text) is important information that helps search engines understand what the image shows.
<Image src="/office.jpg" alt="Exterior of the First CH LLC office" width={800} height={600} />
Instead of just writing “image,” set text that describes the content of the image specifically.
Summary: Common Mistakes and an SEO Checklist
Common Mistakes and How to Avoid Them
Mistake 1: Making Every Page CSR
If you use Next.js with only React knowledge, every page can end up using CSR (client-side rendering).
Fix: Use SSG or SSR for content pages, and use CSR only for user-specific pages such as admin screens and account pages.
Mistake 2: Forgetting to Set Up a Sitemap
In WordPress, a plugin generates it automatically, so you do not think about it. In Next.js, you have to set up the sitemap yourself.
Fix: Add checks for the sitemap and robots.txt to your pre-launch checklist.
Mistake 3: Dynamic Meta Tags Are Not Being Generated
Sometimes every blog post’s title and description are left at the same default values.
Fix: When fetching data from the CMS, add code that puts each post’s title and description into metadata.
SEO Checklist
| Item | Importance | What to do |
|---|---|---|
| Choosing SSG/SSR correctly | Critical | Serve content pages with SSG or SSR |
| Setting the title and description | Critical | Set unique meta tags on every page |
| OGP setup | High | Optimize how pages look when shared on social media |
| Sitemap generation | High | Generate sitemap.xml automatically |
| robots.txt setup | High | Give crawlers the right instructions |
| Structured data | Medium | Aim for rich snippets |
| Image optimization | Medium | Improve Core Web Vitals with next/image |
| alt attribute | Medium | Set alternative text for images |
When set up correctly, Next.js is a framework that is very strong for SEO. However, unlike WordPress, it is not a case of “install a plugin and you are done.” It requires technical understanding and proper implementation.
If you want to build a site with Next.js that is strong for SEO, we can support you all the way from choosing the technology to designing for SEO.
Related articles:
- 5 Benefits of Building a Small Business Corporate Site with Next.js
- What Are Core Web Vitals? Why Small Businesses Should Address Them
- What Is Website SEO? A Simple Guide for Beginners
At First CH, SEO is included as standard when we build sites with Next.js. If you are looking for a site built with both technical skill and SEO know-how, please feel free to contact us.
Web制作・システム開発は
First CHにお任せください
「こんなWebサイトが欲しい」「このシステムは実現できる?」——
現役エンジニアが直接お話を伺い、最適な進め方をご提案します。
「まだ構想段階」「費用感だけ知りたい」というご相談も歓迎です。
