Creating Multiple Sites Using Host Header Names (IIS 6.0)

Every Web site has a descriptive name, and can support one or more host header names. Organizations that host multiple Web sites on a single server often use host headers because this method enables them to create multiple Web site identities without using a unique IP address for each site.

  Important

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName "mmc %systemroot%\system32\inetsrv\iis.msc".

Procedures

To add a Web site using a host header identifier using the Web Site Creation Wizard

1.

In IIS Manager, expand the local computer, right-click the Web Sites directory, point to New, and then click Web Site.

2.

Click Next.

3.

In the Description box, type the name you have selected for the Web site, and then click Next.

4.

In the Enter the IP address to use for this Web site box, click the IP address used by all sites on the server.

5.

In the TCP port this Web site should use box, type the port number used by all sites on the server.

6.

In the Host Header for this Web site (Default:None) box, type the host header name to identify the Web site. The host header name must contain the full name of the site, for example, www.microsoft.com.

7.

If SSL encryption is not enabled on the server, the SSL port box does not appear. If SSL encryption is enabled on the server, type the SSL port number, and then click Next. Note that you cannot use host headers with SSL encryption.

8.

In the Path box, type or browse to the path of your Web site home directory.

9.

To create a secured or private Web site, clear the Allow anonymous access to this Web site check box, and click Next. (Web sites are configured for anonymous access by default.)

10.

In the Web Site Access Permissions box, set the permissions for the home directory.

11.

Click Next, and then click Finish.

  Important

You must be a member of the Administrators group on the local computer to run scripts and executables. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run your script or executable as an administrator. At a command prompt, type runas /profile /user:MyComputer\Administrator cmd to open a command window with administrator rights and then type cscript.exeScriptName (include the script's full path and any known parameters).

To add a Web site using a host header identifier using the Iisweb.vbs command-line administration script

1.

If the new Web site will be in a new directory, create the new directory.

2.

From the Start menu, click Run.

3.

In the Open box, type cmd, and then click OK.

4.

At the command prompt, switch to the systemroot\system32 directory.

5.

Type the following at the command prompt and then press ENTER:

cscript iisweb.vbs /create HomeDirectory SiteDescription" /d Host Header /i IP Address /b Port

  Note

The Iisweb.vbs script supports many more options for creating a Web site. To see the options available, see Creating Web Sites Using Iisweb.vbs.

Related Information

For detailed information about the different methods of hosting multiple Web sites on a single server, see Hosting Multiple Web Sites on a Single Server.

For information about Web site names, see Domain Name Resolution.



© 2014 Microsoft Corporation. All rights reserved. Contact Us |Terms of Use |Trademarks |Privacy & Cookies
Microsoft