IIS and DNS Settings for Mobile Redirection

There are many posts on the internet that tell you how to do a mobile device detection and redirection. I have a post on that subject too.

But here the subject is about what you should do before redirecting to the mobile site, let's say “m.mysite.com”.
Just a bare redirection to m.mysite.com will not work. You need to:

1. Create a new website on your IIS to host your mobile content
2. Create an A Record on your DNS server (For information on CNAMEs and A records you can check out my post)

1. Create a New Website on IIS

Open IIS Manager
Right-click “Sites”, click “Add Web Site”
On the window that opens:
-Enter “m.mysite.com” for “Site name” and “Host name” values (“Site name” can be anything you like)
-Select “Physical path” and browse to the folder in which your mobile content resides
-Set the “IP Address” value to the ip of your server
-Click OK to save

2. Create an A Record

Login to your registrar account. This is the account where you registered the domain name for your website (mysite.com). For example if you used godaddy for domain name registration, you need to login to your godaddy account, and then (for godaddy):

Go to Domain Management
Click the domain name that you want to setup a new A Record for
Launch DNS Manager
On the “A (Host)” section:
-Enter “m” for the Host value
-Enter the IP of your server for the “Points to” value
-Set TTL to 1 hour
-Save the zone file

Now wait for the new DNS records to propagate. After a few hours open your mobile phone, type the address of your website. It should redirect to your mobile site and bring up your mobile content. (Assuming you had already done what I told in this post)

Hope this helps someone.

Good luck,
Serdar.

Leave a Reply

Your email address will not be published. Required fields are marked *