IIS newb. In IIS How do I get my website to resolve to an IP address as well as it's associated domain name? It currently resolves through the domain but I also need to able to view it via the IP.
How a website responds in IIS (any version) largely depends on how you setup the website. That statement (and the answer that follows) is also true for other web servers such as Apache. There are three primary "keys" that identify a website in IIS:
- IP address
- Host headers
Consider the following example:
DNS 'A' record for www.yourwebsite.com points to 192.168.10.200 (which is your host server IP address). When you setup your website in IIS, you indicate that it should be listening on that IP address (and not "All Unassigned"). It will be listening over port 80 by default. If that is the only website setup on that server (and thus, that IP address), and you do not include a host header in the website configuration, IIS will respond if you enter either 'http://www.yourwebsite.com' or 'http://192.168.10.200.'
If you have a situation where you have multiple websites on the same IP address, then you will have to setup the websites in IIS to either user host headers or a different port number.
I'll answer for II6. Other versions will vary slightly. If you right click on the website in IIS Manager and choose properties then a dialog box comes up. On the first tab is an IP address dropdown and you can choose it from there or click Advanced and add it there.