Per-route metadata
Create one metadata definition per public route and update the document head when the route changes. Dynamic records need a safe fallback when a slug is missing or a record cannot be loaded.
- Keep the title under a useful search-result length.
- Describe the actual page, not only the company.
- Use one canonical URL format with HTTPS and the preferred host.
- Set og:title and og:description to match the page.
- Use noindex for intentional utility or private routes.
Sitemap and robots.txt
Include only indexable canonical URLs in the sitemap. Robots.txt can guide crawling, but it is not access control and should not be used to hide private data. Protect private routes through authentication.
- List public routes from the content model.
- Generate or maintain their canonical URLs.
- Check the published sitemap for staging or duplicate hosts.
- Submit it in Search Console and inspect priority pages.
Metadata audit sequence
Work through these steps in order. Each one builds on the last, so resist skipping ahead even if a step feels familiar.
- Export every public route and its current title and description.
- Flag duplicates, missing values and titles copied from a template.
- Confirm each canonical points to itself, not to the homepage or a staging host.
- Check Open Graph images resolve to a real, absolute URL.
- Re-crawl after fixes and diff the results against the original export.
Common canonical mistakes
This comes down to a handful of concrete details. Work through the list below and flag the ones you have not covered yet.
- Canonical pointing to a trailing-slash or non-trailing-slash variant that differs from the served URL.
- Every paginated or filtered view canonicalising to the same page, hiding genuinely distinct content.
- A staging or preview domain left in the canonical tag after launch.
- Mixed HTTP and HTTPS canonicals across the same site.