Virtual hosting with IIS / PWS using a single web-site

NOTE: The technique described in this article is only necessary if you are using IIS (Microsoft Internet Information Services) or PWS (Microsoft Personal Web Server) on Windows 98, Windows Me, NT4 Workstation, Windows 2000 Professional, or Windows XP - because IIS/PWS on these Windows versions are limited to a single web-site.
The versions of IIS for Windows Server and Windows Vista do not have this limitation (see reference article below).

"Virtual hosting" means hosting multiple web-sites with different domain names on the same IP address.

It is possible to simulate virtual hosting by redirecting HTTP requests through ASP script.

For example let say you have 3 domain names (, and and want to host a different web-site for each one.

First, in the web server root directory, create a sub-directory for each site.
For example:


Place all the html, image, asp, etc. files for each web-site in the appropriate sub-directory.

Next in the web server root directory, create a default asp file

- with the following script code:

Select Case Request.ServerVariables("HTTP_HOST")
Case "", ""
Response.Redirect ""
Case "", ""
Response.Redirect ""
Case "", ""
Response.Redirect ""
End Select

Modify the directory names and script code to match your domain names.
You should also add script code for error checking etc.

Each incoming HTTP request will now be redirected to the appropriate sub-directory.

In Simple DNS Plus, you configure each domain exactly the same - pointing to the same web-server IP address.