May 13, 2013

How to redirect mobile devices to mobile website?

Does anyone know a good guide for how to detect and redirect website visitors that are using mobile devices/browsers?

If you're using WordPress, try the Jetpack plugin. That comes with a free mobile version that you can enable. Anybody on a phone will see the mobile version automatically.

This one, from, covers several options:


To redirect a mobile visitor, you'll need to determine if their browser is a web browser on a mobile device or not. You can determine which browser the visitor is using. ...


If you are running a Content Management System (such as WordPress or Joomla), there may be plugins already available that help with handling mobile visitors. ...


Because mobile phones typically have a small screen width, you can redirect visitors to your mobile site if they have a screen width of less than or equal to 800 pixels. Place Javascript window.location code in the head section of your main website code. That way when your site is visited, the javascript will see the browser width and redirect to the appropriate site. ...


You can use a .htaccess redirect to transfer visitors based upon the MIME types the browser supports. For example, if the user's browser accepts mime types that include WML (Wireless Markup Language), then most likely it is a mobile device. The code below should be placed in your .htaccess file.




Answer this