rel="alternate" media="x"

rel="alternate" media="x" tags are <link> elements used to inform search engines about an alternate URL with the same (or almost the same) content, but specifically designed for other media or devices (smartphone, TV, speech, print, etc.).

When multiple URLs are associated with one particular piece of content, if each URL serves a purpose, such as being optimized for a particular device, it is best to notify search engines about it. Doing so help them discover the alternate content and serve the right URL to the right user.

Implementation of rel="alternate" media="x" tags

The rel="alternate" media="x" tags must appears in the <head> section of the HTML page:

Code example

<head>
  <link rel="alternate" media="only screen and (max-width: 640px)" href="http://mobile.example.com/" />
</head>