Skip to content
Learn Netverks

Lesson

Step 16/36 44% through track

metadata-seo

Metadata and SEO

Last reviewed May 28, 2026 Content v20260528
Track mode
client_nextjs
Means
In-browser Next.js (client components)
Reading
~1 min
Level
intermediate

This lesson

This lesson teaches Metadata and SEO: the concepts, APIs, and habits you need before advancing in Next.js.

Without Metadata and SEO, you will struggle to read or extend Next.js codebases and playground exercises.

You will apply Metadata and SEO in contexts like: Dashboards, live tables, and detail pages backed by REST or GraphQL APIs.

Write TSX for Client Components, click Run—React 18 CDN + in-browser TSX compile; use client/server lessons explain App Router concepts; mountApp renders interactive UI; printOutput feeds the terminal.

When you can explain the previous lesson's ideas without copying starter code.

Next.js exposes a Metadata API so Server Components can set <title>, descriptions, Open Graph tags, and robots rules without manually editing head in every page.

Static metadata

// app/about/page.tsx
import type { Metadata } from 'next';

export const metadata: Metadata = {
  title: 'About Us',
  description: 'We build learning tools.',
};

export default function AboutPage() {
  return <h1>About</h1>;
}

Dynamic metadata

export async function generateMetadata({ params }: Props): Promise<Metadata> {
  const post = await getPost((await params).slug);
  return { title: post.title, description: post.excerpt };
}

SEO habits

  • One meaningful h1 per page; heading hierarchy for accessibility
  • Canonical URLs for duplicate content
  • Structured data (JSON-LD) for products and articles when needed
  • Server-render critical content—avoid empty shells filled only by client fetch for public pages

Self-check

  1. Why is metadata usually defined in Server Components?
  2. When do you use generateMetadata instead of a static export?

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • Static vs dynamic metadata?
  • Open Graph pitfall?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump