Skip to main content
SEO Guide

SEO for Next.js: configuration and publishing guide

Next.js SEO treats routes, data, and metadata as one release. App Router can declare metadata statically or derive it from records; this guide targets App Router rather than assuming Pages Router follows the same conventions.

Connect metadata to route data

Use static metadata for fixed pages and generateMetadata when titles, descriptions, or canonical URLs depend on a record. Inspect parent layouts alongside child pages to avoid generic values masking page-specific information. Set a production URL base appropriately when using metadataBase and review language alternates. Fully translated pages need distinct addresses; do not canonicalize every locale to the default language merely because the pages describe the same product.

Design content states alongside rendering

Public routes should supply useful information without requiring a session. Handle missing and unpublished records explicitly instead of leaving an indefinite loading shell. With cached or regenerated content, check when metadata and body become current so a new title is not paired with an old article. Document invalidation according to the deployment architecture rather than choosing arbitrary cache durations to improve a one-off report.

Keep robots and sitemaps consistent

App Router supports metadata file conventions for robots and sitemaps. Advertise published URLs on the production domain and protect private data with access controls rather than robots.txt alone. Metadata delivery can vary with streaming and user-agent handling. Inspect actual responses and Google's tools where necessary instead of assuming a simple HTML parser reproduces the search engine's processing or always finds tags in the expected initial head position.

A worked publishing scenario

Illustrative scenario: an App Router product page derives its title and description from the same product record. Define how a product edit refreshes both metadata and body content, then request Vietnamese and English pages directly after deployment. Client navigation alone is not enough to validate fresh server output. Keep preview routes out of production discovery feeds, and retain a sample record for cache regression tests. This gives developers a concrete publishing contract instead of a general instruction to improve rendering.

A release checklist you can repeat

Keep a small inventory of important pages before changing the website: record the current URL, intended audience, title, and preferred canonical. Make one category of changes at a time and preserve a way to restore the previous configuration. Start with an accessible, useful page rather than optimizing a score while its content remains unavailable.

For translated content, publish a complete version in each language at its own address. Review self-referencing canonicals and reciprocal language links, then include eligible URLs in the sitemap. A translated page is not automatically a duplicate merely because its meaning matches another language. Search engines still decide which pages to index; no configuration promises a ranking or a traffic increase.

Official references

Advertisement

Frequently asked questions

Does a parser missing metadata prove a Next.js SEO defect?
Not necessarily. Account for router, metadata streaming, user-agent behavior, and the complete response; compare URL Inspection before concluding.
Can Vietnamese and English pages both appear on Google?
Yes, each complete public translation can be eligible for indexing at its own URL. Use self-canonicals, reciprocal hreflang and sitemap entries. Google makes the final indexing decision.
Does a successful audit guarantee indexing?
No. An audit reports observable issues, not a search-engine indexing or ranking promise. Verify discovery and crawl status with Search Console.

Check your website SEO now

Scan the important SEO factors for free and get fix suggestions in 60 seconds.