Menu

Nine Languages on a Static Site: Four hreflang Mistakes I Made
📰

Nine Languages on a Static Site: Four hreflang Mistakes I Made

DEV Community: webdev·Zhou Jia·8 days ago
#rBfqw2l0
#devtowebdev#devto#dev#sitemap#locale
Reading 0:00
15s threshold

Last year I helped put a small B2B site into nine languages. No CMS, no i18n framework — just static HTML, one directory per locale, deployed to a CDN. The build was simple. The internationalization was not.

Six months in, the numbers told me something was wrong: one locale was indexed at roughly 70% of its pages while the English source sat near 50%, and a third of the "alternate page" reports pointed at URLs that looked correct on the surface. Here are the four mistakes, in the order I made them.

Mistake 1: treating hreflang as a sitemap annotation

I started by generating hreflang only in the sitemap. It is valid — Google accepts hreflang from sitemaps, HTTP headers, or on-page <link> tags. What I missed is that the three sources are not interchangeable in practice.

If you put hreflang only in a sitemap, nothing on the page itself tells a crawler that this page has siblings. If a page is discovered through a link rather than the sitemap, the relationship is invisible until the sitemap is re-read.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.