Next.js Metadata API: Control Your Site's Preview
The Next.js Metadata API is a structured way to control your page's `<head>` for SEO and social sharing. It lets you define titles, descriptions, and Open Graph images for crawlers and link previews.
The Next.js Metadata API offers a structured way to manage your page's `<head>` tag for SEO and social media. Instead of manual tags, you export a `metadata` object for static info or a `generateMetadata` function for dynamic data fetched at request time. This is how you set titles, descriptions, and generate custom Open Graph images for link previews. The main footgun is forgetting that metadata cascades: child routes merge with and can unexpectedly override parent layout metadata.
Read the original → nextjs.org
- #next.js
- #react
- #seo
- #metadata
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.