Definition
hreflang is the rel-alternate annotation that maps URLs to the language and (optionally) region they target, telling Google which localized version of a page to show to which user. It's expressed as <link rel="alternate" hreflang="en-us" href="..."> in the page head, in the XML sitemap, or as an HTTP header.
hreflang syntax and the three placement options
Three valid places to declare hreflang. (1) In the page head as link elements, one per language/region variant. (2) In the XML sitemap, one xhtml:link per variant per URL. (3) As an HTTP Link header for non-HTML resources. Each language/region pair must appear in all variants — if /en/ declares /de/ as a variant, /de/ must also declare /en/ as a variant. The relationship is reciprocal.
Common hreflang errors
Five common errors. (1) Missing reciprocal — /en/ declares /de/ but /de/ doesn't declare /en/. (2) Wrong language code — using zh-cn for 'Chinese (mainland)' when Google expects zh-Hans or zh-CN; the format matters. (3) Self-referencing only — every page must list itself plus all its alternates. (4) Conflicting canonical — hreflang declares /en/ as a variant but the canonical points to /de/. (5) Region without language — hreflang must have a language; hreflang="us" alone is invalid.
hreflang on Squarespace specifically
Squarespace does not natively support hreflang. The platform's official multilingual approach is to build separate sites or subdirectory-based language splits and to manually handle hreflang via Code Injection. The install pattern: a Code-Injected block in Page Header Code Injection on every multilingual page, declaring all language/region variants including self-reference.
Related terms
hreflang sits inside the international SEO cluster.