hreflang in XML sitemaps
type: TechArticle
description: Declare language and regional alternates inside the XML sitemap with xhtml:link instead of in the HTML head. Easier to maintain at scale and keeps localisation metadata separate from content.
language: en
is part of: Web Specification Studio
author: Web Specification Studio
publisher: Web Specification Studio
license: https://creativecommons.org/licenses/by/4.0/
date modified: 2026-05-29T18:54:03.000Z
citation: Google Search Central — Tell Google about localized versions
  type: CreativeWork
  publisher: Google Search Central
citation: sitemaps.org — XML sitemap protocol
  type: CreativeWork
  publisher: sitemaps.org
citation: BCP 47 — Tags for Identifying Languages
  type: CreativeWork
  publisher: IETF

Web Specification Studio
type: WebSite

Web Specification Studio
type: Organization

breadcrumb
type: BreadcrumbList
item list element: Home
  type: ListItem
  position: 1
  item: https://webspecification.com/
item list element: Spec
  type: ListItem
  position: 2
  item: https://webspecification.com/spec/
item list element: Internationalisation
  type: ListItem
  position: 3
  item: https://webspecification.com/spec/i18n/
item list element: hreflang in XML sitemaps
  type: ListItem
  position: 4
  item: https://webspecification.com/spec/i18n/sitemap-hreflang/