
August 7, 2025 08:15 by
Peter
The process of hosting several domain names on a single server is known as virtual hosting. In essence, this is sharing a single server's services across several businesses or websites. It is sometimes referred to as Vhost. A business or organization that does not want to buy or manage many servers typically uses a virtual host. Apache Web Server or IIS Web Server can be used to provide virtual hosting. This blog post will demonstrate how to use IIS Web Server on a Windows Server 2012 virtual machine to establish a virtual host.

Virtual Hosting or Virtual Directory using IIS
- Install IIS on your server VM and restart it.
- Open IIS manager and browse to your site (or choose default site).

Select your web site and right-click the mouse and select “Add Virtual Directory“.

In this window set the alias name and physical path where your webpage is stored. Press the OK button so it will create a virtual directory. The alias name is the name to access this directory over the internet. For example with an alias of abc_alias we can access it using the following URL: www.domain.com/abc_alias/.

Now create the default webpage on that “Physical Path directory”, for example home.html, default.asp and abc.html. This default webpage must be added to the Default Document Set. So it can load when the virtual directory is hit over the internet.

Now add the default webpage entry into the “Default Document” of the current Virtual Directory. Open it by double-clicking on the Default Document Icon.

Click Add from the top-right corner and add your default webpage name with extension.
For example homepage.html.

Now test your sub-domain in the web browser using IIS or with a URL.
Syntax: Host_Name/Virtual_Directory_Name.
For example testingadmin.cloudapp.net/subdomain.

Use the same process for creating multiple Virtual Directories. As shown in the preceding image there are three Virtual Directories created that can be accessible using the following URLs.
www.domain.com/aaa/
www.domain.com/bbb/
www.domain.com/subdomain/