I again have problem when working on the mobile seo urls, so the scenario is below:

We have 2 domains www.example.com and www.example.es

The .es is pointing canonical to .com and that's fine as we want to index .com. But when it comes to the mobile urls, we want that when someone visit or register from Spain then they must use our mobile url m.example.es and we have redirected our .com (desktop & mobile) urls to m.example.es, only if the user is from inside the Spain.

So how to implement the "canonical" and "Alternate" tags in both mobile urls m.example.com and m.example.es:

On example.com

<link rel="canonical" href="http://www.example.com/"/>

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

On example.es

<link rel="canonical" href="http://www.example.com/" />

What we write for the alternate, because we are using canonical to .com?


<link rel="canonical" href="http://www.example.com/"/>


<link rel="canonical" href="http://www.example.com/"/> 

but .com doesn't have alternate for this ".es" url, if so, anything wrong?

Please let me know how to handle this situation.

Thanks, Sahil

  • 2
    I do not recommend ever redirecting a user based on GEO IP or Browser language identification since they often HIGHLY unreliable also just because someone is in Spain doesn't mean they speak Spanish. In the UK we have over 250K whom can't read or speak English. Generally, the preferred method is always to ask the user if they would 'prefer' to go to X instead of Z, then you save a cookie based on their choice for repeat visits. – Simon Hayter Jul 25 '18 at 15:40
  • 1
    Furthermore, if you treat Googlebot any different than your users e.g you exclude Googlebot from this redirect then it is considered cloaking, so you would need to ensure that Googlebot is treated exactly the same, and obviously if your redirecting .es > .us then Googlebot can't crawl the .es, and again your not allowed to do redirect .es > .us but ignore user-agent Googlebot. It's 2018, there should be no reason to 'PUSH' people to go somewhere, href works to bring the most suitable platform, Google detects mobile sites so on mobile they get the right version and so on. – Simon Hayter Jul 25 '18 at 15:42
  • Rather than redirecting it's definitely safer to let Google sort out which version to send visitors to. And perhaps have a button the user can choose to switch languages, in case they didn't use Google or prefer a different language. What you probably really want is a hreflang attribute - you place it on both versions, and it tells search engines all the content is identical, it's just translated, so Google can display whichever one matches a current searcher's preference. With a regular rel="canonical" you risk only the English being indexed. – WebElaine Jul 25 '18 at 18:31
  • Hi, actually the language is not a problem for the redirection, because almost 80% traffic is from mobile site so due to our product licence, its only allowed to register users from Spain from the.es domain only so that's why we redirected it. And we want to rank .com which also has the spanish language. So I asked the solution as per my situation mentioned above, I didn't mentioned anything about language. – Sahil Jul 26 '18 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.