SEO Metadata Cleanup Across Every Public Page
A site-wide metadata pass: unique titles and descriptions, canonical URLs, Open Graph and Twitter cards, and an audit script that fails the build when any public page is missing required tags.
Verified HMX-owned case
Outcome signals
These are the real outcome statements attached to this HMX case study.
- Unique
- no duplicate titles across public pages
- Canonical
- duplicate paths consolidate to one URL
- Share-ready
- every page renders a proper social card
- CI-guarded
- missing metadata fails the build
Case architecture
SEO Metadata Cleanup Across Every Architecture
- 01one typed metadata helper
A site-wide metadata pass: unique titles and descriptions, canonical URLs, Open Graph and Twitter cards, and an audit script that fails the build w...
- 02Replace ad-hoc per-page
Replace ad-hoc per-page metadata with calls into that helper across all public routes
- 03Next
Next.js generateMetadata API supports the route, form, or data boundary for SEO Metadata Cleanup Across Every so public UX and backend state stay connected.
- 04Metadata helper
Enforce absolute canonical URLs so duplicate and parameterized paths consolidate
- 05Fallback Path
When automation confidence is low, route the record to a manual owner with the source, stage, and last action attached.
- 06Unique no duplicate titles
Unique no duplicate titles across public pages; Canonical duplicate paths consolidate to one URL; Share-ready every page renders a proper social ca...
Problem
The operating gap
Pages ship with duplicate or default titles, missing descriptions, no canonical tags, and inconsistent social cards. Search engines collapse duplicate titles, social shares render blank, and nobody notices until rankings and click-through quietly suffer.
Build
What gets built
Centralize metadata generation in a typed helper that every route's generateMetadata calls, guaranteeing a unique title, description, canonical, and OG/Twitter block per page. Then add a metadata audit script to the verify pipeline so a page that ships without complete, unique tags fails CI instead of reaching production.
Build steps
SEO Metadata Cleanup Across Every Public Page uses a web app route, data, and conversion layer for Full-Stack Websites. A site-wide metadata pass: unique titles and descriptions, canonical URLs, Open Graph and Twitter cards, and an audit script that fails the build w... The architecture connects one typed metadata helper, next, metadata helper, and unique no duplicate titles with an explicit control path.
- 01Write one typed metadata helper that returns title, description, canonical, OG, and Twitter blocks
- 02Replace ad-hoc per-page metadata with calls into that helper across all public routes
- 03Enforce absolute canonical URLs so duplicate and parameterized paths consolidate
- 04Generate consistent OG and Twitter card tags from the same source
- 05Add an audit script that scans built routes for missing or duplicate tags
- 06Wire the audit into the verify gate so incomplete metadata blocks the build
Stack
Tools and layers
- Next.js generateMetadata API
- Metadata helper (lib/site.ts)
- Canonical + Open Graph + Twitter tags
- SEO audit script (npm run audit:seo)
- TypeScript 6
- Experience layer: Write one typed metadata helper that returns title, description, canonical, OG, and Twitter blocks
- Server layer: Replace ad-hoc per-page metadata with calls into that helper across all public routes
- Database layer: Next.js generateMetadata API supports the route, form, or data boundary for SEO Metadata Cleanup Across Every so public UX and backend state stay connected.
- Automation layer: Metadata helper (lib/site.ts) handles routine steps while centralize metadata generation in a typed helper that every route's generateMetadata calls, guaranteeing a unique title, description, canonical, an...
- Measurement layer: Unique no duplicate titles across public pages; Canonical duplicate paths consolidate to one URL; Share-ready every page renders a proper social ca...
Data flow
- 01Write one typed metadata helper that returns title, description, canonical, OG, and Twitter blocks
- 02Replace ad-hoc per-page metadata with calls into that helper across all public routes
- 03Enforce absolute canonical URLs so duplicate and parameterized paths consolidate
- 04Generate consistent OG and Twitter card tags from the same source
- 05Add an audit script that scans built routes for missing or duplicate tags
- 06Wire the audit into the verify gate so incomplete metadata blocks the build
Controls
- Pages ship with duplicate or default titles, missing descriptions, no canonical tags, and inconsistent social cards.
- Centralize metadata generation in a typed helper that every route's generateMetadata calls, guaranteeing a unique title, description, canonical, an...
- When automation confidence is low, route the record to a manual owner with the source, stage, and last action attached.
Research basis
A route assembles through form, data, metadata, and deploy checks.
The same website operating path
Full-stack websites for service businesses and operators: route architecture, service pages, lead capture, metadata, proof boundaries, blog/database paths, analytics, and deployment checks.
Route map
Service architecture
Clear service routes
Lead capture
Form and context flow
Lead capture that saves context
Public metadata
SEO and schema layer
SEO and schema on public pages
Launch QA
Analytics and deployment checks
Analytics events tied to CTAs