0

Question is regarding implementation of cross-domain canonical over a desktop and m. site. desktop and m. site have identical pages hence the option is to add the following tags

Desktop pages: <link rel="alternate" media="only screen and (max-width: 640px)" href="http://m.example.com/page-1">

Mobile pages: <link rel="canonical" href="http://www.example.com/page-1">

Question is what if the desktop site contains canonical tags pointing to the respective pages before the cross domain work is carried out.

Desktop pages: <link rel="alternate" media="only screen and (max-width: 640px)" href="http://m.example.com/page-1">

& a canonical tag on the desktop pages

I would like to know if the above is best practice to have both a rel alternate and rel canonical tag on the same page. I feel the answer is a NO & never since the m. site is showing the rel canonical.

1
  • You might want to learn the meaning of the word canonical. Commented Jun 9, 2015 at 17:44

1 Answer 1

2

Although a single URL for all devices is highly preferred, yes you can use them both on the same page. It works as long as the desktop version is always the canonical, and the mobile is always the alternate. According to Google:

To help our algorithms understand separate mobile URLs, we recommend using the following annotations:

  • On the desktop page, add a special link rel=”alternate” tag pointing to the corresponding mobile URL. This helps Googlebot discover the location of your site’s mobile pages.
  • On the mobile page, add a link rel=”canonical” tag pointing to the corresponding desktop URL.

In the article that contains this quote, they actually use the exact same examples as you do. See this article here: https://developers.google.com/webmasters/mobile-sites/mobile-seo/configurations/separate-urls?hl=en

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.