Skip to main content

Hreflang Self-Referencing Tag (Each Page References Itself)

Issue No: 168

Category: International SEO

Issue type: Issue

Priority: IMPORTANT

Description

Every page that participates in an hreflang cluster must include a self-referencing hreflang tag pointing to its own URL. Google requires this for the hreflang set to be considered complete and valid.

How do we capture it

  1. Issue an HTTP GET to the target URL.
  2. Read the raw response and capture the final resolved URL (after any redirects).
  3. Parse the <head> block of the raw HTML text for all <link rel="alternate" hreflang="..."> tags.
  4. Extract the href attribute from every hreflang tag.
  5. Compare each href value against the page's own canonical URL (normalized: trailing slash, lowercase scheme/host).
  6. Validate whether any hreflang tag's href matches the page's own canonical URL.
  7. Verify that the matching hreflang tag's language code is a valid ISO 639-1 value or an ISO 639-1 + ISO 3166-1 pair.
  8. Flag the page as missing a self-reference if none of the hreflang href values match the canonical page URL, or if only a relative URL is used.
  9. Check whether the matching self-referencing href is a fully qualified absolute URL. Set self_ref_href_is_absolute = FALSE if the value does not contain a scheme and host.
  10. Compare the URL scheme of the self-referencing href against the scheme of the crawled page URL. Set self_ref_scheme_matches_page = FALSE if they differ (e.g., self-referencing tag uses http while the canonical page is https).

W1hat to store

FieldTypeComment
has_self_referencing_hreflangBOOLEANWhether the page includes a self-referencing hreflang tag
self_ref_hreflang_langTEXTThe hreflang language code used in the self-referencing tag
self_ref_hreflang_hrefTEXTThe exact href value of the self-referencing tag
hreflang_cluster_sizeINTEGERTotal number of hreflang alternate tags found on the page
self_ref_href_is_absoluteBOOLEANWhether the self-referencing hreflang href is a fully qualified absolute URL
self_ref_scheme_matches_pageBOOLEANWhether the URL scheme of the self-referencing href matches the crawled page URL scheme

Condition for trigger

The following trigger rules evaluate hreflang self-referencing compliance:

  • Trigger Rule 1: Missing Self-Referencing Hreflang Tag

    • Target Field: has_self_referencing_hreflang
    • Evaluation Logic: = FALSE
    • Severity: CRITICAL
    • Diagnostic Message: "This page does not include a self-referencing hreflang tag. Google requires each page in an hreflang cluster to reference itself. The hreflang set may be ignored."
  • Trigger Rule 2: Hreflang Tags Present But No Cluster

    • Target Field: hreflang_cluster_size
    • Evaluation Logic: = 1
    • Severity: WARNING
    • Diagnostic Message: "Only one hreflang tag was found on this page. A valid hreflang cluster requires at least a self-referencing tag and one or more alternate language tags. Isolated hreflang tags may not be processed by search engines."
  • Trigger Rule 3: Self-Referencing Hreflang Href Is Not Absolute

    • Target Field: self_ref_href_is_absolute
    • Evaluation Logic: = FALSE AND has_self_referencing_hreflang = TRUE
    • Severity: WARNING
    • Diagnostic Message: "The self-referencing hreflang href is not a fully qualified absolute URL. Google requires all hreflang href values to be absolute URLs including scheme and host."
  • Trigger Rule 4: Self-Referencing Hreflang Scheme Mismatch

    • Target Field: self_ref_scheme_matches_page
    • Evaluation Logic: = FALSE AND has_self_referencing_hreflang = TRUE
    • Severity: WARNING
    • Diagnostic Message: "The URL scheme of the self-referencing hreflang href does not match the crawled page URL scheme. Using http in the self-referencing tag when the canonical page is served over https may cause the cluster to be treated as mismatched."

Sources

Long description

Google's hreflang specification requires that every page in a hreflang cluster include a self-referencing hreflang tag — a tag whose href points back to the page itself. This signals to Google that the page is aware of its own place in the internationalized cluster.

Without a self-referencing tag:

  • Google may treat the hreflang cluster as incomplete.
  • The page may not be included in hreflang matching logic.
  • Wrong language versions may be served to international users.

Common problems:

  • Page declares alternates for other locales but omits a tag for itself.
  • Self-referencing tag uses a non-canonical URL variant.
  • Hreflang tags are added only on the homepage and not on all language variants.
  • The self-reference uses an HTTP instead of HTTPS canonical URL.

How to Fix

Every language page must include its own self-referencing hreflang tag. To resolve the issue:

  1. Ensure every language variant page references itself.
  2. Use the exact absolute canonical URL (e.g. including HTTPS and correctly handling trailing slashes).
  3. Include all alternate language tags on every page in the cluster, not just the homepage.