Skip to main content
Alvin QuachFull Stack Developer
HomeProjectsExperienceBlog
HomeProjectsExperienceBlog
alvinquach

Full Stack Developer building systems that respect complexity.

Open to opportunities

AQ

Projects

  • All Projects
  • Hoparc Physical Therapy
  • OpportunIQ
  • Hoop Almanac
  • SculptQL

Knowledge

  • Blog
  • Experience
  • Interview Prep

Connect

  • Contact
  • LinkedIn
  • GitHub
  • X

Resources

  • Resume
© 2026All rights reserved.
Back to Blogs
Tutorial
Depth: ●●○○○

Next.js SEO: robots.ts, sitemap.ts, and Metadata API Patterns

Configure SEO with Next.js metadata file conventions. Dynamic sitemap generation, robots.txt configuration, and the Metadata API for titles, descriptions, and Open Graph images.

Published November 5, 20251 min readImportance: ★★★☆☆
Share:

Summary of Next.js SEO Setup

Below is a compact reference of the robots, sitemap, and metadata setup you described, suitable as a quick checklist or snippet library.

Key Concepts

robots.ts → Generates /robots.txt to control crawler access.

sitemap.ts → Generates /sitemap.xml listing static and dynamic routes.

Metadata API → Central and per-page SEO configuration via metadata and generateMetadata.

Recommended Disallow Paths

/studio – CMS admin interface

/api/ – JSON API endpoints

/preview – Draft preview routes

/admin – Any admin dashboards