Article ID: 228760 - View products that this article applies to.
This article was previously published under Q228760
We strongly recommend that all users upgrade to Microsoft Internet Information Services (IIS) version 7.0 running on Microsoft Windows Server 2008. IIS 7.0 significantly increases Web infrastructure security. For more information about IIS security-related topics, visit the following Microsoft Web site:
http://www.microsoft.com/technet/security/prodtech/IIS.mspxFor more information about IIS 7.0, visit the following Microsoft Web site:
This article describes how to use the Hosts file to test a site that uses a host header name over an intranet.
Caution Modifying the Hosts file on your computer incorrectly can interfere with name resolution. Be sure to make a backup copy of the Hosts file before modifying it. After testing that the new site that uses a host header name is working properly, you may want to return your Hosts file back to its original form.
Also, if your intranet uses Dynamic Host Configuration Protocol (DHCP) to dynamically assign IP address to computers, keep in mind that the IP addresses can change, and therefore the IP address referred to in your Hosts file may eventually belong to another computer.
For more information about how to use host header names on a computer that is running IIS, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/190008/ )How to use host header names to host multiple sites from one IP address in IIS 5.0
If the computer that is running IIS and that contains the site that uses the host header name is located on an intranet (a private LAN that uses Internet technology), the host header name must be first be registered with the intranet's name resolution system, such as the Windows Internet Name Service (WINS), before it can be browsed to.
In order to test the site immediately (without waiting for the intranet's administrator to update the name resolution system), modify the Hosts file of the computer you plan to browse from.
Add entry for host header name site to Hosts fileOn a local Windows NT computer, perform the following steps to update the Hosts file, so that requests for the site using the host header name are routed to the correct IP address:
Test the Hosts fileTo make sure the Hosts file is working properly, go to a command prompt, and type PING HostHeaderName, where "HostHeaderName" is the host header name used by the new site.
The reply should contain the same IP address that was returned earlier when Pinging the IIS computer.
Browse the site by using the host header nameIf the PING was successful, indicating that the intranet is routing connections to the host header name to the IIS computer, use a Web browser to load the new site, using the host header name.
(c) Microsoft Corporation 2000, All Rights Reserved. Contributions by Kevin Zollman, Microsoft Corporation.
Article ID: 228760 - Last Review: July 7, 2008 - Revision: 6.1
Contact us for more help