Components

Pages Router Head component

Declare page-specific head elements in the Pages Router. Give repeated meta elements a stable key where deduplication is needed. Head content is cleared when its owning component unmounts, so each page must declare what it requires. Use App Router metadata rather than migrating this component into app pages. Example context: Next.js 16.x documentation lane; illustrative snippet or file tree, not executed. Exact candidate patch 16.4.6 remains unverified. Expected behavior / verification: Inspect title and description after direct and client navigation to another page. Check there is no stale or duplicate description.

Formal Syntax & Structure

nextjs syntaxnextjs
import Head from "next/head"

Working Example

Example Snippetnextjs
import Head from 'next/head';export default function Catalog() {  return <><Head><title>Catalog | River Books</title><meta name="description" content="Browse books" key="description"/></Head><h1>Catalog</h1></>;}
Next.js Reference