1

I posted a question on Stack Overflow today. Now, I'm not sure if it should have been posted there or here. That question can be seen here, I have copied it here for the ease of access.

I have a web site that is currently hosted at IP address 11.11.11.111 (this is a fake address, just for communicating). I can successfully access the site via www.mydomain.com. I now want to allow a user to access m.mydomain.com.

This url needs to use the same IP Address. It will be hosted on the same web server, but as its own application. Currently, I have created a new CNAME record with my GoDaddy account. That record has the following properties:

CNAME

Host: m
Points To: @

On my web server, I have a web application called "Mobile". This application has a site binding with the following properties:

Site Binding

Type: http
Host Name: m.mydomain.com
Port: 60
IP Address: 11.11.11.111

When I type "m.mydomain.com" into my browser, I see the original website. I do not see the mobile version. What am I doing wrong?

3 Answers 3

2

You need to set up a host header in your binding for your site, so that the webserver knows where to go when you hit the same IP address with m.mydomain.com, and not just mydomain.com

http://technet.microsoft.com/en-us/library/cc753195(v=ws.10).aspx

Just set it to m.mydomain.com and that site will host your mobile version of the webapp while your other site running the same port, will handle the other traffic to www.mydomain.com or mydomain.com.

1

Port: 60 means that your app is listening on port 60. You'll need to add :60 to the end of your URL to access it.

Chances are you don't have a port specific binding, or have a wildcard binding for *.mydomain.com, which will cause all unmatched requests to be answered by mydomain.com.

0

You need to combine @MDarra and @LarsWA answers to make it work: setup both sites to use host headers in your binding as well as port 80.

basically, you'll have the following bindings:

IP: 111.111.111.111
Port: 80
Host-header: www.mydomain.com

and

IP: 111.111.111.111
Port: 80
Host-header: m.mydomain.com

That will do what you want. Just be aware that it will NOT work with SSL/HTTPS

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .