While most modern websites use a responsive design, some older sites still use a separate URL for their mobile version (often on an “m.” subdomain). For these sites, the mobile alternate link (`<link rel=”alternate”>`) is a critical signal that tells search engines about the relationship between the desktop and mobile versions of a page. A missing or incorrect implementation of this tag can lead to serious duplicate content issues and a poor user experience.

Think of your desktop and mobile sites as a book and its audiobook version. They are the same content in different formats. The `alternate` and `canonical` tags are the way you tell the librarian (Google) that they are a matched pair, not two different books. For a broader look at mobile SEO, see our guide on the on-page SEO category.

An illustration of a desktop and a mobile phone with a two-way arrow between them, symbolizing the alternate and canonical link relationship.

The Two-Way Handshake for Separate Mobile URLs

A correct setup for separate mobile URLs requires a two-way link between the two versions of your page. As Google’s documentation on duplicate content makes clear, these signals are essential.

Example: A Correct Mobile/Desktop Pair

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

A Step-by-Step Guide to Fixing Your Mobile Links

The goal is to ensure every desktop page has a valid `alternate` link and every mobile page has a valid `canonical` link. For a deep dive into this topic, this guide from Ahrefs on mobile SEO is an excellent resource.

  1. Crawl Your Site: Use an SEO audit tool like Creeper to discover all of your desktop and mobile URLs.
  2. Identify Missing Tags: The crawler will flag any desktop pages that are missing a `rel=”alternate”` link and any mobile pages that are missing a `rel=”canonical”` link.
  3. Implement the Correct Tags: Work with your developer to add the correct tags to the `<head>` of your page templates. The `href` must be the absolute URL of the corresponding page.

Frequently Asked Questions

Is having a separate mobile site (m-dot) bad for SEO?

It is not inherently ‘bad,’ but it is an outdated and more complex setup than a modern responsive design. If you have a separate mobile site, implementing the correct `alternate` and `canonical` tags is absolutely critical to avoid duplicate content issues. However, the modern best practice is to use a single, responsive URL for all devices.

What is the ‘Vary: User-Agent’ HTTP header?

The `Vary: User-Agent` header is a signal to search engines that they should crawl your site with different user-agents (i.e., both mobile and desktop crawlers) to discover the different versions of your content. It’s a crucial part of a separate mobile URL setup.

How can I find all the pages on my site that are missing these tags?

The most effective way is to use a website crawler like Creeper. It will scan your site and can be configured to identify pages on your mobile subdomain (e.g., m.example.com) and report on whether they have a valid canonical tag pointing to the desktop equivalent, and vice versa.

Are your mobile and desktop sites properly connected? Start your Creeper audit today to find and fix any missing alternate or canonical tags.