Skip to main content

Digital Marketing

How to Implement a Rel=Alternate Tag

Abstract Background Of Spheres And Wire Frame Landscape

Rel=Alternate Video Tutorial Script

Today I am going to explain how to implement a rel=alternate tag to support your mobile SEO efforts, and when you should use it.

When Should You Use a Rel=Alternate Tag?

If you’re setting up your mobile website as a separate sub-domain or sub-folder on your site, you’ll need to implement a Rel=Alternate link from the desktop version of a page to the mobile version of that same page. Keep in mind that you don’t need to use a Rel=Alternate tag if you’re using Responsive Web Design or a Dynamic Serving implementation for your mobile site.

How do you implement a Rel=Alternate Tag?

  1. Place a rel=alternate tag on each desktop page of your site for which you have a corresponding mobile page. Note that the tag should be placed in the section of the page.
  2. Write out the actual rel=alternate tag as follows (shown below).
  3. Update the source page on your live website and you’re done!
Rel=Alternate Example
<link rel=”alternate” href=”http://m.yourdomain.com/example-page” >

But wait, there’s more!
Implementing a Rel=Alternate Tag is a great way to start setting up the tags for your site, but there are two other tags that you should be aware of.

First is the Rel=Canonical tag. Plan on placing one of these on each of the pages of your mobile sub-domain (or sub-folder), and linking it back to the corresponding desktop page of your site.

Together, we sometimes refer to these as “Switchboard” tags. They work together to make sure that Google and Bing understand the relationships between the desktop and mobile versions of your site.

Second is the Vary: User-Agent header. Consider using it with a mobile sub-domain (or sub-folder). It plays an important role in preventing ISPs from messing up your overall mobile implementation.

Thank you. That’s it for today.

For a video tutorial on vary:user-agent see How to Implement a Vary:User-Agent Header.

More of Digital Marketing Classroom

For other tutorials in this series see: Digital Marketing Classroom.

Thoughts on “How to Implement a Rel=Alternate Tag”

  1. Hi Eric. I have a question related to the mobile first announcement and rel canonical and rel alternate. If the mobile version of a site if the preferred one, the one that will be indexed should we still use the rel canonical tag from mobile to desktop?
    Or should we switch the tags, considering that mobile is now first?

  2. No need to change. Google said that you can still have the desktop point to mobile with a rel=alternate, and mobile point to desktop with rel=canonical. You do NOT need to change them, but you should keep them in place. On a side note, if you WANT to switch them, you can, but do make sure that you execute the changes correctly!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Eric Enge

Eric Enge is part of the Digital Marketing practice at Perficient. He designs studies and produces industry-related research to help prove, debunk, or evolve assumptions about digital marketing practices and their value. Eric is a writer, blogger, researcher, teacher, and keynote speaker and panelist at major industry conferences. Partnering with several other experts, Eric served as the lead author of The Art of SEO.

More from this Author

Categories
Follow Us
TwitterLinkedinFacebookYoutubeInstagram