How can I host multiple websites with port 80 on iis on same computer?

jacobdu215

Reputable
Jul 19, 2014
36
0
4,530
I have a Windows Server 2008 R2 and I'm hosting a website. But my dad wants me to host his on the Default port as well. How can I do tht? Hosters like godaddy have many external IPs on default port from same machine. Plz help.
 
Solution
This is not done by the router it is done by the web server itself. You must use a single machine to host both sites...it is technically possible to use multiple but the first machine must still take the traffic.

To make this work you must have multiple domains registered to the same address. so if I have site1.com and site2.com both registered to 123.123.123.123. The traffic will come to 123.123.123.123 and be port forwarded to your server say 192.168.0.10. Now inside the actually HTTP headers you will actually see the site1.com or site2.com data strings that the user passes. Most web servers already know how to do this you just need to configure it to work it is not something you have to code yourself. Follow the...
This is not done by the router it is done by the web server itself. You must use a single machine to host both sites...it is technically possible to use multiple but the first machine must still take the traffic.

To make this work you must have multiple domains registered to the same address. so if I have site1.com and site2.com both registered to 123.123.123.123. The traffic will come to 123.123.123.123 and be port forwarded to your server say 192.168.0.10. Now inside the actually HTTP headers you will actually see the site1.com or site2.com data strings that the user passes. Most web servers already know how to do this you just need to configure it to work it is not something you have to code yourself. Follow the instructions in the previous post.

This is why some sites you can open the url by name but you get errors if you key in the IP address directly.
 
Solution