Has HREF Lang

Has HREF Lang is a boolean signal that reports whether a page’s document head contains the literal attribute text hreflang=—the markup used to declare language or regional alternates. It returns 1 when that text appears and 0 when it does not, and it only checks for presence: a match does not prove the annotations are valid or correctly targeted.

Factor IDRG-TEC-013
FamilyTech & platform
MeasurementBoolean presence (0 / 1)
Measured zoneRendered, script-free document head

What it measures

Has HREF Lang indicates whether the document head contains the literal attribute text hreflang=. Hreflang annotations exist to identify language or regional alternatives of a page, so their presence is a surface-level indicator that a site has attempted international or multilingual targeting. The factor observes only that the attribute text is present—nothing about which languages, regions, or destinations are declared.

How RankGear measures it

RankGear lowercases the rendered, script-free document head and performs a substring check for hreflang=. If that string is found, the factor returns 1; otherwise it returns 0. It does not parse language codes, resolve destination URLs, verify reciprocal (return-link) annotations, check canonical alignment, or inspect HTTP status. The check is deliberately a presence test, not a validation of the hreflang cluster.

What RankGear looks for

<link rel="alternate" hreflang="en-gb" href="https://example.com/gb/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/" />

Only the substring hreflang= needs to appear anywhere in the head for the factor to score 1.

ValueMeaning
1The document head contains the text hreflang=.
0No hreflang= text was found in the head.

How to optimize it

Treat this as an observation about your markup, not a target to chase for its own sake. Use hreflang only for genuine language or regional equivalents of a page. When you do, supply valid language and region codes, include self-references and reciprocal links across the cluster, and add an appropriate x-default where it helps. Keep canonical tags and indexability consistent with your hreflang declarations, and test the complete cluster—because this factor confirms presence only, correctness has to be verified separately.

Important considerations

  • Presence does not prove correct international targeting—a page can score 1 and still be misconfigured.
  • A malformed annotation can still score 1, because the check tests only for the attribute text.
  • Single-language sites generally do not need hreflang, so a 0 is often the expected, correct value.
  • Validate destinations, return links, and language codes independently of this factor.
  • This is a prioritization signal that relates to position within a measured result set—it is correlation, not causation, and does not by itself cause a page to rank.

Related factors

Part of the Factors reference · how RankGear measures · glossary.