user2822838
user2822838

Reputation: 347

Pointing a subdomain to an application hosted on IIS on another server

I have a web server hosting a domain name , say www.example.com. Now, I would like to host a subdomain, say newExample.example.com which is hosted on another server.

Now, I understand that this is possible by entering, in the admin control panel, an 'A' record which points the subdomain to the ip address. But, what if I would like to point my subdomain to an address such as : 11.11.11.11/newExampleWebsite . Is this possible?

The '11.11.11.11/newExampleWebsite' is hosted as an application in IIS 7.

Thanks,

Upvotes: 2

Views: 2443

Answers (1)

user2822838
user2822838

Reputation: 347

OK, I found an elegant solution to this.

I have used the hosting control panel to point the subdomain to the IP address instead of 11.11.11.11/newExampleWebsite. But, to ensure 'newExampleWebsite' is displayed when navigating to newExample.example.com we need do the following in IIS.

  • Create a new website in IIS.
  • Give it a name, such as 'newExampleWebsite'.
  • The target directory will be same as the one being used for '11.11.11.11/newExampleWebsite' .
  • Enter the host name as 'newExample.example.com'.
  • IIS takes care of resolving the correct website based.

enter image description here

The kicker is I had to host two subdomains and I just pointed both to this IP address and let IIS resolve these.

Upvotes: 1

Related Questions