Metadata follows the route
A few moving parts are involved here. The points below cover each of them, so you can see the full scope before deciding where to start.
- Title: unique, concise and aligned with the visible heading.
- Description: useful summary of that specific route.
- Canonical: absolute preferred URL on the live domain.
- Open Graph: matching title, description and image.
- Robots: index or noindex based on the route's purpose.
With that model in place, implement it using the steps below.
- Create a route-to-metadata map for fixed pages.
- Load CMS metadata only after validating the record and slug.
- Update the document head on navigation.
- Prevent stale metadata during loading and not-found states.
- Inspect source and rendered output on the published URL.
Verification checklist
This comes down to a handful of concrete details. Work through the list below and flag the ones you have not covered yet.
- View source shows correct title and description, not a default placeholder.
- Metadata updates correctly on client-side navigation, not just first load.
- Not-found routes return genuinely different metadata and a non-200 status where appropriate.
- Loading states never leave stale metadata from a previous route.
- Canonical URLs are absolute and match the actual published domain.
Common route metadata mistakes
Use the list below as a working checklist. Each item is something you can verify or action directly on your own site.
- Metadata set once in a root component and never updated on navigation.
- CMS-driven titles left blank while the record is still loading.
- Canonical URLs using a relative path or the wrong domain in different environments.