• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Serving different content to smartphone/'mobile' users


Senior Member
Hi All

Been looking at ways to show different content to smartphone/mobile users. I found a way to do it using javascript (Displaying Different Page for a Mobile User. - SitePoint Forums) but I have 2 questions

1) Recently read that the best way is to keep people on the same URL and not redirect them (Google Recommends Single URL For Smart Phone Mobile SEO) - I wondered if anyone has a reference to a straightforward tutorial on how to do this, without using javascript? (I assume some smartphones/similar may have javascript disabled) I guess it would be using some sort of css technique/using a different css file?

2) I also wondered if anyone could direct me to a reference of how to redirect people server side, for when I need to monitor hits on a specific mobile url?



Senior Member
Hi bamme, my site is currently Flash based and as such users who log on from an iPhone/Pad/Pod get redirected to a non-Flash version and this was done by putting a simple htaccess file on the root of my site, there a tutorial here!


Active Member
Why do you want to show different content?
If its a requirement, you could redirect to a subdomain using wac's solution .htaccess (apache server)
301 Redirect - How to create Redirects

Although I haven't read the "Google recommends article" my argument is, if the content is different! then it should be served on different url's
If the content is the same then you should use css media queries to style the html page into a suitable mobile experience.

Showing different content to different devices on the same URL is messy imho.


Senior Member
Sunburn said:
Showing different content to different devices on the same URL is messy imho.
Very true. Until smartphones get even more complicated, there will always be a problem.

Stupid iphones!