Technical SEO
Why we centralize page metadata instead of hand-writing every tag
Metadata is repetitive enough to look easy. A title. A description. A canonical. Open Graph fields. A Twitter card. Maybe an article date. Maybe an image. That repetition is exactly what makes metadata error-prone. If thirty routes contain thirty manually assembled metadata objects, thirty routes can drift.
Centralization gives us one policy surface
Several of our repos have a metadata helper that accepts a small set of page-specific values:
- title
- description
- path
- image
- optional article fields
The helper turns those inputs into the complete metadata object. It builds the absolute canonical URL. It builds the absolute social-image URL. It applies the site name. It sets locale and social card type. In some projects it also applies environment-aware robots rules.
The route only supplies what is unique about that page.
Why paths are better inputs than full URLs
A route knows its path. For example:
path: `/services/${service.slug}`
The metadata helper knows the production site URL. That division reduces string duplication and makes it harder for a staging hostname or old domain to leak into canonical metadata. It also makes domain migrations more manageable because the base URL is centralized.
The same content object should drive the visible page and metadata
A service page should not have one title in the H1 and a completely unrelated title hidden in a copied metadata object unless that difference is deliberate. Our dynamic routes usually load one normalized content object and use it for both. The service title can feed the H1. The meta-title override can feed the search title if one exists. The description can feed the page summary and fall back into metadata. The hero image can become the social image.
That keeps the invisible document consistent with the visible one.
Social metadata deserves the same discipline
Open Graph and Twitter metadata are often forgotten because they do not affect the page until somebody shares a link. A centralized builder can make the social fields a default part of every page rather than an optional afterthought. This is why our current connectrader audit checks for Open Graph title, description, image, Twitter card type, Twitter title, Twitter description, and Twitter image across public pages.
The system treats shareability as part of the page contract.
Environment-aware robots rules fit naturally here
One of our metadata helpers returns indexable robots metadata only when the deployment is production. In nonproduction environments, it returns noindex and nofollow behavior, including stricter bot instructions. That is a good example of metadata being infrastructure rather than copy. The page author does not have to remember whether the current branch should be indexed. The environment policy decides.
Article metadata can extend the same model
Articles need a few additional fields. Published time, modified time, author information, and an article Open Graph type can all be derived through the same builder pattern. The route stays readable because it says what the page is, not how every meta tag is spelled.
The builder also creates a natural validation point
If the canonical logic is centralized, a validation script can require route files to use the shared builder. If social metadata needs a new field, the builder can add it for all routes using the system. This turns a website-wide SEO change from a search-and-replace project into a library change.
We still allow overrides
Centralization should not flatten every page into identical metadata. A location page may need a more specific description. A case study may need a custom social image. An article may need a deliberately different title for the search result. The helper accepts those differences as inputs.
The policy stays shared. The content stays page-specific.
Why copy-paste fails slowly
Copied metadata usually works at first. The page has a title. The link preview appears. Nothing crashes. Months later, somebody notices three pages share the same canonical, an old brand name still appears in a social image alt value, or a location page is sharing the generic homepage image.
These are quiet failures. A metadata builder reduces the number of places they can originate.
Why this matters when the site grows
At ten pages, manual metadata is manageable. At one hundred pages across services, locations, articles, case studies, and docs, repeated logic becomes a liability. The route family should define the page type. The content model should define the page-specific fields. The metadata builder should define the site's metadata policy.
That division is simple enough to maintain and strong enough to scale.
From explanation to proof
Where this connects to the work
This category connects our search recommendations to implementation details that can be inspected, tested, and maintained.