Metadata and SEO
SEO starts with pages that are understandable, crawlable, fast, and worth reading. Metadata helps describe those pages; it does not replace them.
Give each public route a specific identity
Use static metadata for fixed pages and generateMetadata when values depend on route data. Titles and descriptions should describe the page people are actually landing on, not repeat one site-wide string everywhere.
Set a canonical host, use route-specific Open Graph images where they add value, and keep important content present in server-rendered HTML.
import type { Metadata } from 'next'
export const metadata: Metadata = {
title: 'Projects',
description: 'Selected product and engineering work.',
alternates: { canonical: '/projects' },
openGraph: {
title: 'Projects',
images: ['/projects/opengraph-image.png'],
},
}Use the root for defaults, not every page's final copy
The root layout is a good place for metadataBase, a title template, authorship, default social images, and other site-wide defaults. Individual routes can then provide the part that is actually unique.
This keeps metadata consistent without turning every page into a clone of the homepage.
Make discovery boring and reliable
- Expose canonical public URLs in sitemap.xml.
- Use robots.txt intentionally; do not rely on it as an access-control system.
- Use permanent redirects when a public URL moves.
- Keep internal links crawlable.
- Return meaningful HTML and successful status codes for real public pages.
- Use noindex for pages that should not appear in search.
Structured data should describe visible reality
JSON-LD can help machines understand entities such as a Person, WebSite, Article, or BreadcrumbList. It should match content a visitor can actually see.
For a personal engineering site, Person and WebSite data are useful global foundations, while article-specific structured data belongs on the article itself.
Metadata cannot rescue thin content
A useful technical article that answers a real question has far more search value than a page stuffed with keywords. Write the page for the person who has the problem, then make its metadata accurately describe that page.
Good internal linking also matters: a caching article can point to a performance guide, a project case study, and a related tool without forcing the reader back through the homepage.
Can you explain “Metadata and SEO” without reaching for the API reference?
Describe the main trade-off, one failure mode, and the decision you would make in a real project.