trending
•

2d ago

next-intl-alternates - Canonical and hreflang metadata for next-intl sites

Canonical and hreflang links for a multilingual Next.js site take four lines of configuration and are easy to get subtly wrong, and wrong here fails quietly: search engines just drop the annotation. next-intl-alternates builds them from your next-intl routing. It avoids the canonical that redirects (a home page joined to a locale prefix), leaves out languages a page doesn't actually have, and handles as-needed prefixes. Try the configuration live on the demo site. Free and open source.