I have multiple websites hosted in a single site in IIS, and I want to recognize it with different website addresses.
For example, I want http://test.mydomain.com/site/1
to be seen as www.xyz.com/site/1
where test.mydomain.com
is the main site hostname.
All these sites are on intranet and same domain.
How can i do this?
-
A CNAME is a DNS record so I'd contact the admin of the DNS of your Intranet.
From Pascal Thivent -
You need to create a CNAME record or an A record (either one will work, I prefer to use A records) in your public DNS zone for each name that you want to be associated with the site. You'll also need to add host headers to the site for each name that you want to be associated with it. You'll need access to your public DNS records or request this from the party that hosts your public DNS namespace.
From joeqwerty -
The DNS side is pretty easy. A CNAME is a record that basically says "look up this other name instead and use the results of that."
So at the DNS level, you'd do something like this in the xyz.com zone:
www.xyz.com. IN CNAME test.mydomain.com.
Specifics of how you actually do that depends on what software your DNS is running and/or how your DNS is being managed.
I believe you then have to configure IIS to accept www.xyz.com. as a valid inbound name for the site defined as test.mydomain.com.
From David Mackintosh -
All of these answers pertain to the DNS side of things, getting the users to the server. Within IIS you still have to specify how to determine which request goes to which site. Basically, when you create a binding in IIS you have to specify port but most people don't notice there is an option for hostname as well. Assuming that you don't want to use multiple ports for the different sites, you just need to set the binding for each site including the hostname. When traffic hits the server it will check the requested hostname and return the appropriate site.
joeqwerty : I did mention in my post about adding host headers to the site for each name that he wants to direct to the site. Granted, host headers is not the only way to do it and I didn't go into detail, but I did mention it.From Charles -
Alternatively, if you are merely doing this for your development/testing purposes, you will only need to edit the
hosts
file on your computer. You can handle the CNAME records when the time comes to make it public.From sybreon
0 comments:
Post a Comment