Create Multiple Web Applications On Port 80 On IIS

This is an obvious requirement for any client when it comes to hosting for HTTP.  If you want to host multiple SharePoint site collections on the same Port 80, it can be achieved through following steps.

  1. Create a web application on Port 80 and provide the host header as the alternate access mapping URL content without http://, i.e., suppose the alternate access mapping URL is http://indiansharepoint.com, then you have to consider the host header as indiansharepoint.com. Look at the below snapshot.

    Internet & Web
  1. Create another web application on Port 80 again and provide the host header as the alternate access mapping URL content without http://. Suppose the alternate access mapping URL is http://IndianGeek.com, then you have to consider the host header as com. Look at the snapshot.

    Internet & Web

  2. Now, create site collections for both the web applications as usual. I am not going to give an explanation about it here.

  3. The, open the file hosts present in the location  C:\Windows\System32\drivers\etc\. Open the "hosts" file in Notepad.

There, you can find the DNS record. Now, you have to add records in the following format. Since we have created 2 sites as of now with host headers, you need to enter the host headers in front of each host header so that you will be able to access both the sites without any conflict.

Internet & Web

In the above snapshot, we have given the description after the # symbol. While entering the record for our sites, we should not use # before the record entry. Each entry should be added one below the other. After each entry, press the ENTER key .The format would be 

127.0.0.1 <SPACE> Host Header Name 

ie.

127.0.0.1 indiangeek.com    <Press enter Key>
127.0.0.1 indiansharepoint.com

Note

127.0.0.1 may vary. I am not sure but in the host file itself, you will get the information about this. So no worries.

Save the host file.

Now, you can access the sites easily which are hosted on the same port. You don't need to mention the port number, be it 80 or some other port.


Similar Articles