S.
  • Services
  • For you
  • Solutions
  • Work
  • About
  • Know-how
  • Blog
Start a project
EN/PL/RU
  • Services01
  • For you02
  • Solutions03
  • Work04
  • About05
  • Know-how06
  • Blog07
Start a project
EN/PL/RU
Vlad Sedenko
Independent web product developer
EU / Poland / Warsaw
Products
  • NextWooNext.js storefront for WooCommerce
© 2026. All rights reserved
Services
  • Product Discovery
  • UX/UI Design
  • MVP Development
  • SaaS Development
  • Website Redesign
  • Web Application Security
  • Conversion Optimization
  • API Integrations & Business Automation
  • Product Support
Explore
  • Services
  • For you
  • Work
  • Solutions
  • About
  • Blog
  • Know-how
  • Contact
Start a project
  • vlad@sedenko.net
  • LinkedIn
  • Privacy/Cookies
Know-how/Next.js SEO Checklist: The Complete Guide for App Router (2026)

Part 2 of 22

Metadata API: titles, descriptions and the template pattern

Using the Next.js Metadata API right: metadataBase, title templates, generateMetadata for CMS content and deduplicating fetches with React cache().

2026-07-15
Metadata API: titles, descriptions and the template pattern

All topics in this guide

A practical, section-by-section SEO checklist for Next.js: rendering strategy, Metadata API, hreflang, structured data, Core Web Vitals, and optimization for AI answer engines.

The App Router replaced next/head with the typed Metadata API. Two ways to use it — static export for fixed pages, generateMetadata for dynamic ones:

// app/layout.tsx — site-wide defaults with a title template
import type { Metadata } from "next";

export const metadata: Metadata = {
  metadataBase: new URL("https://example.com"),
  title: {
    template: "%s | Acme",
    default: "Acme — Web Development Studio",
  },
  description: "Default description used when a page doesn't set its own.",
};
// app/blog/[slug]/page.tsx — dynamic metadata per post
export async function generateMetadata({ params }): Promise<Metadata> {
  const post = await getPost(params.slug);
  if (!post) return { title: "Post not found" };

  return {
    title: post.title, // becomes "Post title | Acme" via the template
    description: post.excerpt,
  };
}

Practical rules that actually move rankings:

  • Title: ~50–60 characters, primary keyword near the beginning, unique per page. Google rewrites bad titles — don't give it a reason.
  • Description: ~150–160 characters. It doesn't affect ranking directly, but it is your ad copy in the search results and drives CTR.
  • metadataBase is mandatory — without it, relative OG image and canonical URLs break in production.
  • Deduplicate the fetch between generateMetadata and the page component with React cache() — otherwise you hit your CMS twice per request.
import { cache } from "react";

export const getPost = cache(async (slug: string) => {
  return fetchPostFromCMS(slug);
});

Checklist:

  • metadataBase set in the root layout
  • Title template defined once, pages set only their own part
  • Every page has a unique title and description
  • CMS-driven pages use generateMetadata with a cache()-wrapped fetch
  • Fallback metadata for 404 / missing-content states
← PreviousRendering strategy: what does the crawler actually see?Next →Canonical URLs and hreflang: one page, one address

01—22

All topics in this guide

  1. 01Rendering strategy: what does the crawler actually see?→
  2. 02Metadata API: titles, descriptions and the template pattern•
  3. 03Canonical URLs and hreflang: one page, one address→
  4. 04Open Graph and dynamic OG images→
  5. 05sitemap.ts and robots.ts: file conventions instead of hand-written XML→
  6. 06Structured data: JSON-LD that earns rich results→
  7. 07Images, fonts and scripts: the classic performance trio→
  8. 08Core Web Vitals: the three numbers Google measures→
  9. 09Redirects, 404s and status codes→
  10. 10Caching and content freshness→
  11. 11AEO/GEO: getting cited by ChatGPT, Perplexity and Google AI Overviews→
  12. 12Monitoring: SEO is a loop, not a launch task→
  13. 13Trust and E-E-A-T: making your site believable→
  14. 14Image SEO: turning pictures into traffic→
  15. 15Internal linking and site architecture→
  16. 16Search intent: pages that match what people actually type→
  17. 17Programmatic SEO in Next.js: pages at scale without the spam→
  18. 18SEO migration: replatforming to Next.js without losing traffic→
  19. 19Pagination and faceted navigation without index bloat→
  20. 20Accessibility and SEO: one job, two rewards→
  21. 21Content decay: refresh, consolidate or prune→
  22. 22Off-page for developers: earning links without buying them→

Want this handled for you?

I audit and fix technical SEO on Next.js sites — indexing, performance, hreflang and AI visibility.

Technical SEO service