Can a canonical link also declare hreflang or media alternatives?

The Citead team, updated

In short. Keep canonical, hreflang, and media annotations in separate link elements when following Google's documented Search guidance.

Definition: A canonical link identifies the preferred URL for duplicate or very similar pages. hreflang and media annotations describe alternate versions, so Google documents them as separate link annotations with different roles.

Key facts

  • Google describes a rel="canonical" link annotation as a strong signal for the URL it specifies in its canonical URL documentation.
  • When a page uses hreflang, Google says to specify a canonical page in the same language, or the best possible substitute language when no same-language canonical exists.
  • Google's localized versions documentation gives rel="alternate" hreflang="..." as the HTML form for language and regional variants.
  • Google says not to combine hreflang annotations with attributes such as media in a single link tag.
  • The HTML Standard defines alternate as a link to an alternate representation and describes hreflang and type as attributes that describe that representation.

Can the annotations share a page head?

Yes. A page can carry a canonical annotation and alternate annotations in its head, but each link element should have one clear purpose. The canonical element points at the preferred URL for duplicate or very similar content. Google's canonical documentation calls that annotation a strong signal and recommends a canonical link on the canonical page itself.

The canonical element is therefore separate from the language mapping. Google's example of the canonical form is:

<link rel="canonical" href="https://example.com/dresses/green-dresses" />

The canonical URL is a preference for canonicalization. It does not list the language or regional pages that Google should associate with the current page.

How should hreflang be written?

Google's localized versions documentation describes three equivalent ways to indicate language and locale versions: HTML, HTTP headers, and an XML sitemap. For HTML, it gives this syntax:

<link rel="alternate" hreflang="lang_code" href="url_of_page" />

Each language version must list itself and all other language versions. The alternate URLs must be fully qualified, including http or https. Google also says that a page using hreflang needs a canonical page in the same language, or the best available substitute language if that page does not exist.

That means a translated page can have its own canonical link and a set of separate rel="alternate" hreflang="..." links. The canonical target should represent the page's language when such a version exists. The hreflang set then connects the language and regional variants.

Where does media fit?

Google gives a specific implementation restriction for alternate representations: do not combine hreflang annotations with other attributes such as media in one link tag. Keep a language annotation separate from a media-specific alternate annotation.

The HTML Standard gives the broader meaning of these attributes. It says that alternate references another representation of the current document, that hreflang can indicate a translation, and that type can indicate a reformulation in another format. Its example includes a print representation with media="print". That generic HTML example does not replace Google's Search guidance for hreflang.

For a Google-facing HTML head, use separate elements for the canonical URL, language variants, and media variants. Do not put media on the same element as a Google hreflang annotation. The retrieved Google documentation does not define a combined rel="canonical" and rel="alternate" syntax, so the separate-element form is the documented implementation pattern.

FAQ

Can rel="canonical" and rel="alternate" appear on the same page?

Yes. Place them in separate link elements. The canonical element names the preferred URL, while the alternate elements describe language, regional, or other representations.

Google says not to combine hreflang annotations with attributes such as media in one link tag. Use separate alternate elements for the language and media cases.

Should every translated page have a canonical URL?

Google says that pages using hreflang should specify a canonical page in the same language, or the best possible substitute language when a same-language canonical does not exist.

Sources

  1. Google Search Central, "How to specify a canonical URL with rel="canonical" and other methods", 10 July 2026
  2. Google Search Central, "Localized Versions of your Pages", 21 September 2026
  3. WHATWG, "HTML Standard", 19 October 2026

Check how a page reads to answer engines. Open the GEO score analyzer

Test a page and see what to fix first

The analysis usually takes less than 10 seconds and needs no account.

400,000+ pages scored in the public benchmark