A dynamic route needs dynamic metadata A Next.js article or product route can share one component while each URL needs a distinct title, description, canon...
A dynamic route needs dynamic metadata
A Next.js article or product route can share one component while each URL needs a distinct title, description, canonical address, and social image. In the App Router, metadata can be produced from the route parameter with generateMetadata. The page body and metadata should read the same source record so they cannot disagree about the title or publication state.
If a slug does not exist or is unpublished, return a 404. An empty page with a generic title is not a useful search result and can create index quality problems.
Build one canonical URL
Choose the preferred host and path format, then create the canonical URL from the verified record slug. Avoid copying arbitrary request query parameters into it. If the same content appears under category aliases or campaign URLs, those variants should point to the preferred article URL.
Use a stable metadata base so image and canonical references become absolute URLs. Confirm the rendered HTML includes tags for crawlers that do not execute client code.
Match the visible content
The H1 should describe the same article as the title tag, though it need not be character for character identical. A meta description should summarize the page's actual answer, not promise information absent from the article. Use meaningful image ALT text and a social image that represents the content.
For lists, create crawlable links to detail pages. A client only filter can improve interaction, but the initial HTML and server routes should still make articles discoverable.
Handle dates and structured data
Published and modified dates should come from actual CMS events. Do not refresh the modified date merely to make an unchanged article look recent. BlogPosting JSON-LD should use the same headline, author, image, canonical URL, and dates displayed on the page. Never add fake ratings.
Validate the result
Inspect the HTML response for several slugs, an unknown slug, and a draft. Test duplicate canonical variants and social previews. Submit the sitemap containing only public canonical URLs, then monitor indexing in Search Console.
Conclusion
Dynamic SEO works when metadata and page content are generated from the same published record. Next.js supplies the head tags; the CMS supplies accurate information. See web and SaaS development for content driven application work.
References