Directing Users to Your Mobile Site

October 20, 2011
0 minute read

Your mobile website is designed, published and ready to go. Now what? Nearly 20% of the sites built and beautifully designed on DudaMobile are not redirected from their regular sites.

One of the most important programmatic steps necessary when building a mobile website , is the creation of the redirection that will bring users to your site.

Generally, your regular desktop website will be located at a URL of the form www.mysite.com – and you’ll place your mobile site on the subdomain m.mysite.com. While mobile users could type in m.mysite.com and reach your mobile site, they are more likely to go to the address they know from the desktop web. More importantly, search engines will most often point to the www.mysite.com web address.

There are three ways to go about creating this redirection

  1. On the front-end, using JavaScript.
  2. On the back-end, using whatever programming language used in your site.
  3. On the web server level, if your site is served by Apache, using .htaccess directives.

Whatever the approach, the principle is the same

First: Detect which user agent (web browser) the user is arriving from. If the browser is a mobile browser – that if certain substrings are found within the user agent: iPhone , Android , etc. (lists of these are available via a quick Google search) – you can continue on to the second step.

Second: Redirect the user to the mobile site’s address. Take into consideration whether or not you’d like to forward mobile users arriving at any page of your desktop site to the mobile site, or, alternatively, only those arriving at the homepage. If you choose the former, you’ll then want to decide whether to forward users arriving on a given page onto the parallel page on the mobile site, or simply to the mobile site’s homepage. Obviously, you’ll need to ensure your mobile site’s code is built in such a way that allows for this. If you create your mobile site on DudaMobile, this is all taken care of for you.

Have a Question About Mobile Web Development?

Direct all questions, tips and comments to Shaun Waksman, DudaMobile’s Product Manager. Send him an email at Shaun@dudamobile.com.


Did you find this article interesting?


Thanks for the feedback!
Website mockups with error message
By Ilana Brudo November 13, 2025
Don't let AI-generated websites cause day-two headaches. Learn why agencies need governance and control, and how Duda's AI stack offers speed without the risks.
By Shawn Davis November 11, 2025
For small and medium-sized businesses (SMBs), conversion isn’t just about generating leads. It’s about helping potential customers act in the exact moment they’re ready. Traditional “contact us” forms and phone calls create unnecessary friction: the customer must wait, the business must respond, and momentum often disappears. A booking tool changes that dynamic. It lets customers confirm a time, get a confirmation, and move forward immediately. That single step, pivoting from inquiry to commitment, has a measurable effect. Research across multiple industries shows that websites offering real-time scheduling convert more visitors into paying customers. As AI search and zero-click search eat away at the amount of organic traffic being sent to SMB websites, developing high-quality conversion experiences has never been more important. From salons to consultants to local trades, every lost call or delayed email represents missed revenue. A booking tool captures intent before it fades.
A website with a 503 error
By Shawn Davis November 6, 2025
Learn how Jared Broussard's agency scaled client websites by switching from WordPress to Duda, saving time and costs while boosting efficiency and growth.
Show More

Latest posts