Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I want the to know the correct desktop to mobile redirection logic. How should a visitor be sent to mobile version or the desktop version of site?

I've a mobile site: m.example.com and desktop site at: www.example.com What I'm using now:

  1. First visits will be detected and redirected to mobile or desktop version
  2. Second time onward same session visit to any URL (mobile or desktop) will not be redirected. I mean if first time a m.example.com is served and then the user types www.example.com then desktop version will be served from his mobile device

What is the correct way when to transfer a visitor to mobile or the desktop version?

share|improve this question
add comment

1 Answer 1

You can use Google's recommendations for mobile sites. Your first step is in compliance with those recommendations but not the second step. You should always redirect based on user agent detection and not session - but allow users the option to choose (usually as part of the footer).

You also need to implement canonical tags (on the mobile pages) and alternate tags (on the desktop pages).

Google's recommendations in details:

https://developers.google.com/webmasters/smartphone-sites/redirects https://developers.google.com/webmasters/smartphone-sites/details

share|improve this answer
    
Sorry .. I asked only for the redirection logic .. not the technicalities of it. –  AgA Dec 10 '13 at 5:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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