Chapter 14 of 21
Continue learning Next.js step by step.
Metadata & SEO
Learn how to add metadata and improve SEO in Next.js.
Theory
Next.js provides built-in support for metadata.
Metadata can be used to define page titles, descriptions and other information used by search engines and browsers.
Good metadata helps search engines understand web pages.
Example
export const metadata = {
title: "CodingWithMee",
description: "Learn programming online",
};Output
The page receives the specified title and description metadata.
Practice
Add title and description metadata to your Next.js page.
Interview Questions
1
What is metadata?
2
Why is metadata important for SEO?
3
How can metadata be defined in Next.js?
Quick Quiz
Which option best describes this chapter?
A.SEO and page information
B.Database connection
C.CSS animation
D.API authentication