BF50 Black Friday · 50% off all plans
from $5/mo · Auto-applied ---:--:-- Claim 50% off →
Skip to content

Search Seonio

Type a keyword, domain, or paste a URL

Start free with $1 to see full results. Powered by Seonio
SEO

Rel alternate: What it means and when to use it

rel="alternate" points to another version of the same page: a translation, a feed, a mobile URL or a PDF. Which uses search engines read, with code.

Rel alternate: What it means and when to use it
Click the image to view it full size

rel="alternate" is a link type in HTML that says "the page at this URL is another version of the current one". The other version might be in a different language, a different format, for a different device, or a feed of the same content.

You'll usually see it as a <link> element in the page's <head>:

<link rel="alternate" hreflang="de" href="https://example.com/de/">

The HTML standard also allows it on <a> and <area> links. On its own, alternate says little. Its meaning comes from the attribute next to it: hreflang, type or media. HTML Standard

The jobs rel="alternate" does

Paired with It points to Who reads it
hreflang="fr" A version in another language or for another region Google Search
media="only screen and (max-width: 640px)" A separate mobile URL Google Search
type="application/rss+xml" or application/atom+xml A feed of the site's content Browsers and feed readers
type="application/pdf" (or another format) The same content in that format Browsers and other software
rel="alternate stylesheet" A style sheet visitors can switch to Firefox only

The standard also says the relationship works both ways across a set: if a page names two alternates, those two are alternates of each other too.

For SEO, the first two rows are the ones that matter.

Language and regional versions with hreflang

This is the most common use. Each language version of a page lists every version, including itself:

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

Google uses these annotations to show searchers the version that fits their language or region. Its rules: Google Search Central

  • Every version lists all versions, itself included. If page A names page B but B doesn't name A, Google may ignore the annotations.
  • Use full URLs with https://, not /de/ or //example.com/de/. Alternates may be on other domains.
  • Use valid codes. A language code (ISO 639-1), optionally followed by a region code (ISO 3166-1 alpha-2): de, en-GB, es-MX. A region code alone isn't valid, and only officially assigned codes count: the United Kingdom is GB, not UK.
  • Add x-default for visitors whose language you don't serve, ideally pointing to a language selector page. See x-default.

You can give Google the same information in three places: <link> tags in the HTML, a Link: HTTP header (handy for PDFs and other non-HTML files), or an XML sitemap. Google treats them as equal. Pick one; using all three adds work and no benefit.

Hreflang doesn't tell Google what language a page is in. Google's systems work that out from the content itself. Our hreflang article covers the details.

Separate mobile URLs

If your site serves mobile visitors from separate URLs, such as m.example.com, Google wants the two versions connected. The desktop page names the mobile page as its alternate; the mobile page names the desktop page as its canonical: Google Search Central

<!-- On https://example.com/ -->
<link rel="canonical" href="https://example.com/">
<link rel="alternate" media="only screen and (max-width: 640px)" href="https://m.example.com/">

<!-- On https://m.example.com/ -->
<link rel="canonical" href="https://example.com/">

Google recommends responsive design instead, with one URL for all devices, because it's the easiest to build and maintain. If you have that, you don't need this annotation.

Feeds and other formats

A feed link in the <head> lets browsers and feed readers find your RSS feed automatically:

<link rel="alternate" type="application/rss+xml" href="/feed.xml" title="Example blog">

If you list several feeds, software that picks a default uses the first one. The same pattern with type="application/pdf" tells software that a PDF version of the page exists.

What rel="alternate" doesn't do

It doesn't choose which URL search engines index, and it doesn't fix duplicate content. That's the job of rel="canonical".

Language versions aren't a duplicate content problem in the first place. Google treats localized pages as duplicates only when the main content stays untranslated, for example when only the navigation and footer change.

To check a page, view its source and search for rel="alternate". Make sure every URL you list returns a working page and, for hreflang, that each target links back.

Seonio

Put it to work on your own site

Keyword research, traffic, backlinks and clustering in one place. Start with a free $1 to test, no card required.