GitHub

Hreflang Tags

Checks for hreflang link elements

Checks for hreflang link elements

Rule IDi18n/hreflang
CategoryInternationalization
ScopePer-page
Severityinfo
Weight3/10

Solution

Hreflang tags tell search engines about language and regional variations of pages, preventing duplicate content issues and ensuring users see the right version. Add hreflang link tags for each language/region version of a page. Include x-default for the fallback. Every page referenced should link back to all variants (bidirectional). Use correct ISO language and country codes.

Enable / Disable

Disable this rule

squirrel.toml
toml
[rules]
disable = ["i18n/hreflang"]

Disable all Internationalization rules

squirrel.toml
toml
[rules]
disable = ["i18n/*"]

Enable only this rule

squirrel.toml
toml
[rules]
enable = ["i18n/hreflang"]
disable = ["*"]

Type to search…

↑↓ navigate ↵ open esc close