An increasing number of people surf the Internet using a mobile device, such as a smart phone or a tablet. Website owners can choose to either make their sites resize based on screen size or send mobile visitors to a separate version of the website that is optimized for phones. Creating an "m" subdomain for the phone-optimized version of your site is a good way to separate it from the main site, but you need to also redirect mobile visitors to the subdomain. Detecting screen size is a simple way to tell mobile browsers to redirect to the subdomain.
Make a Subdomain
Log into the control panel for your Web hosting account. Click the "Subdomains" icon, which is often grouped with other domain-related tools.
Type "m" in the subdomain field. Select the domain you want to add the subdomain to, using the dropdown list.
Take note of the FTP location where your new subdomain's files will go. This information typically displays on the subdomain creation page as soon as you enter the subdomain's name. Submit the form to create your subdomain. The subdomain should go live right away, but you must upload files to it before anything will appear there.
Video of the Day
Write the Redirect
Open the file for your website's home page, which is usually "index.html" or "index.php." If there are no "" tags in that file, open the heading file, typically named "header.html" or "header.php."
In the above script, change "yourdomain.com" to your own domain.