The setup is absolutely so, as Google recommends:

www.example.com has a media query for narrower display sizes and redirects users to m.example.com, if display becomes narrower, as setting. Both versions are tied to each other with alternate<->canonical.

The fun begins with fetching as Google in the search console.

What happens, if you fetch as Google www.example.com and select a mobile user agent for fetching? Damn right - the googlebot stands on www.example.com and is not redirected to m.example.com. Why? Because googlebot has no display width!

But the same could happen during the crawling procedure in the wild web: the bot comes with mobile user agent to www.example.com and gets wrong site version and content, because it isn't redirected properly to m.example.com.

Now the million bucks question: how to redirect gooblebot with mobile user agent, if the general redirect logic isn't based on explizit user agent identification, what is absolutely recommended.

  • When you say media-query, you mean a CSS media-query? Because it that case, it means that your redirection happens on the client-side and thus the google bot would probably never get the redirect even if it had a display width.
    – xpy
    Jul 18, 2016 at 15:49

1 Answer 1


Hm, I'll take the shot, so we can discuss this little bit more. Interesting question.

I'd do this:

On the desktop page I'd add rel=”alternate” tag pointing to the mobile URL. This will help bot to discover the location of site’s mobile pages.

On the mobile page, I'd add a rel=”canonical” tag pointing to the desktop URL.

If HTTP redirection is difficult to implement, you can alway use JavaScript to redirect users to the URLs pointed to by the link rel="alternate" tag

  • This bidirectional tie-in exists already. I just wonder about: the only case, where the googlebot with mobile user agent is properly redirected from desktop to the mobile version, is if the whole redirect logic is based on user agent recognizing.
    – Evgeniy
    Apr 19, 2016 at 23:39

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.