hreflang In Sitemap vs On-Page/Headers: Pick By Scale
Three valid places to declare hreflang. Choose one and only one per setup.
On-page link rel=alternate tags when:
— Few languages, HTML pages, full template control.
HTTP Link headers when:
— Non-HTML files (PDFs) need hreflang.
XML sitemap hreflang (xhtml:link entries) when:
— Many locales and many URLs — keeps page HTML lean and centralizes the matrix in one place you can audit.
The non-negotiable rule for all three: hreflang must be reciprocal AND every alternate must self-reference. The sitemap method makes the full matrix auditable in one file — its main advantage.
Pass/fail:
— ✅ Each URL's entry lists ALL alternates including itself.
— ❌ Never mix sitemap hreflang with on-page hreflang for the same URLs.
Definition of done: one declaration method, fully reciprocal, no duplication across methods.
The Sitemap SOP
@SitemapSOP
hreflang In Sitemap vs On-Page/Headers: Pick By Scale
Этот пост опубликован в Telegram-канале The Sitemap SOP. Подписаться можно по ссылке: @SitemapSOP.