Write useful page titles and descriptions
Give each important page a distinct title, a useful description, and a canonical URL only when you know which URL should represent it.
For your setup.
Choose your platform. A report may suggest one from source or delivery hints; confirm it matches the website you control.
Merge the relevant change into your existing configuration. These examples do not inspect your code or apply changes automatically. Test on a preview, then check the live response.
Define route metadata in the App Router
Export metadata for a server-rendered route. Use accurate, page-specific text and the canonical URL that the site actually serves.
import type { Metadata } from 'next';
export const metadata: Metadata = {
title: 'Page title',
description: 'A concise description of this page.',
alternates: {
canonical: 'https://www.example.com/page-path',
},
};Verify: View the rendered document head and confirm title, description, canonical, and social metadata match the visible page.
Next.js: generateMetadata ↗Why this matters
Titles and descriptions help describe a page in browser and search interfaces. Search engines can choose different title links and snippets, so metadata is guidance rather than a guaranteed display or ranking lever.
Give each page a descriptive title
Use a concise title that names the page’s actual subject. Keep it distinct across pages and avoid repeated boilerplate or lists of near-duplicate phrases.
<title>Opening hours and menu | River Street Café</title>Describe what a visitor will find
Write a short, page-specific summary in plain language. A search engine may use page text instead of the meta description, and may truncate either display to fit the result.
<meta name="description" content="See the River Street Café menu, opening hours, and address in Bristol.">Choose a canonical URL intentionally
If equivalent URLs expose the same content, select the preferred URL and use an absolute canonical link consistently. Do not canonicalize distinct pages to the homepage or assume this forces a search engine to accept your choice.
<link rel="canonical" href="https://example.com/menu">Check the rendered source
Inspect the final HTML for duplicate titles, descriptions, and canonicals. Confirm that the canonical page is accessible and that internal links point to the preferred URL.
For your setup
WordPress
Edit SEO fields through the active theme or SEO plugin. Avoid having multiple plugins or theme defaults emit competing title, description, or canonical tags.
Next.js
Use the App Router Metadata API in a server page or layout. Dynamic routes can derive metadata from the same page data used to render the content.
Check your work
- View source or inspect the response HTML, not only a client-side DOM after scripts run.
- Check title and description uniqueness for important pages.
- Confirm canonical URLs resolve to the intended final page.
- Use Search Console to observe indexing and appearance; do not infer rankings from source phrases.