Technical SEO

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.

HMX Zone
Metadata helper (lib/site.ts)

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

6 nodes
one typed metadata helper
Replace ad-hoc per-page
Next
Metadata helper
Fallback Path
Unique no duplicate titles
  1. 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...

  2. 02Replace ad-hoc per-page

    Replace ad-hoc per-page metadata with calls into that helper across all public routes

  3. 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.

  4. 04Metadata helper

    Enforce absolute canonical URLs so duplicate and parameterized paths consolidate

  5. 05Fallback Path

    When automation confidence is low, route the record to a manual owner with the source, stage, and last action attached.

  6. 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.

  1. 01Write one typed metadata helper that returns title, description, canonical, OG, and Twitter blocks
  2. 02Replace ad-hoc per-page metadata with calls into that helper across all public routes
  3. 03Enforce absolute canonical URLs so duplicate and parameterized paths consolidate
  4. 04Generate consistent OG and Twitter card tags from the same source
  5. 05Add an audit script that scans built routes for missing or duplicate tags
  6. 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

  1. 01Write one typed metadata helper that returns title, description, canonical, OG, and Twitter blocks
  2. 02Replace ad-hoc per-page metadata with calls into that helper across all public routes
  3. 03Enforce absolute canonical URLs so duplicate and parameterized paths consolidate
  4. 04Generate consistent OG and Twitter card tags from the same source
  5. 05Add an audit script that scans built routes for missing or duplicate tags
  6. 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

01active
Progress72%

Lead capture

Form and context flow

Lead capture that saves context

02active
Progress86%

Public metadata

SEO and schema layer

SEO and schema on public pages

03active
Progress64%

Launch QA

Analytics and deployment checks

Analytics events tied to CTAs

04active
Progress91%

Build a website with the same traceability.

All systems operational
HMX Zone
(c) 2026 HMX Zone