Stop canonicalizing 21 translated locales into English

Fixkamo-marketing
Shipped
August 12, 2026 at 2:40 PM UTC
Author
Kamo
Commit
50eacff

Every non-English page carried a hardcoded canonical to its /en twin — `export const metadata` is module-level, so it could not vary by locale and 28 pages shipped `canonical: **************** to all 22 locales. The message bundles are ~99.5% translated (they ship from kamo-translation-dictionary at build time), so this was consolidating ~630 genuinely localized pages into their English versions and throwing them away. Those pages also had no hreflang at all, and the locale root had no metadata whatsoever. Static pages now use generateMetadata with a self-referential canonical and the full 22-locale hreflang cluster. localeAlternates advertises every locale instead of just en/es, and includes the current locale, so the cluster is reciprocal — a page missing from its own hreflang set gets the whole cluster discarded. KB pages get the same treatment; their content is per-locale already (KbArticleTranslationListener covers every locale) but generateMetadata fetched the article without a locale, so French pages advertised English titles. The sitemap advertised only en/es as alternates and emitted KB URLs with no locale prefix, which under localePrefix "always" made every KB entry a redirect. localeRobots becomes collectionRobots: the noindex on ~2,400 detail pages is about the collection data in app/lib/** being English-only, not about the locale, so es no longer claims content it does not have. That gate lifts when the data moves into the dictionary.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing