Page 1 of 1

How to run IIS multiple websites on port 80

Posted: Tue Jan 03, 2023 6:00 am
by Ale
Web hosts need to accommodate multiple websites on a single server for a cost-effective approach.

But, can we run IIS multiple websites on port 80 of the server?

Fortunately, with the help of the host header in IIS web server, we can host multiple sites and use the same port 80.

At Bobcares, we often receive requests to set up IIS multiple websites on port 80 as part of our Server Management Services.

Today, let’s analyze the problems that screw up the IIS configuration and see how our Support Engineers fix it for our customers.


IIS can host multiple websites
IIS will be able to host multiple websites. Up until IIS 3, each website needs to have a dedicated IP address. From IIS 5, Microsoft introduced a concept of host header. With the host header, we can host multiple websites using a single IP address.

The host header is information that is used with the IP address and port number and helps to identify the website in the webserver. In IIS 10, Microsoft has introduced a new concept to add a wildcard host header. Therefore, let us see how our Support Engineers use the host header to host multiple domains in IIS.



IIS multiple websites on port 80 – How we do it
Recently, one of our customers was trying to add another website in IIS to run using the port 80 itself. He was confused about how to add a domain to use port 80 itself. We helped him to set-up his 2 domains to use port 80. Let us discuss how our Support Engineers helped him.



i) Create a domain from IIS
Initially, we create a second domain in IIS.

To create a domain from IIS, we

Click on Start >>Administrative Tools >> Internet Information Services (IIS) Manager.

Now right-click on Sites and click Add website. Now a window appears. We enter the site name. It will automatically fill the application pool column with the respective website name.

Then, enter the physical path of the website files. Select the protocol type as HTTP and select the IP address from the drop-down list.

In the hostname column, enter the domain name. Finally, click ok.



Now a warning appears binding *:80 is already in use. Ignore the warning and click OK.

Now the newly created website will not load from the browser yet. Now our Support Engineers add a unique host header to make both the website load.



ii) Add host header
Now the newly created domain will be in OFF state. Now, we add the unique host header from binding.

To create a unique hostname:
From IIS click on binding in the action column. Now edit the default entry in binding.

As a default, the hostname will be left blank. Now, enter the Hostname (domain name). Finally, click ok.





Now we will be able to start the website from IIS

As a result, now both the domains will start loading from the web browser.



Conclusion
In a nutshell, the host header can make multiple domains load from port 80. Today, we discussed how our Support Engineers run IIS multiple websites on port 80. This involved creating a domain from IIS and adding the host header.