So you have a server with a single IP address and a domain and you might be searching the internet trying to find out about hosting multiple websites on the same domain or the same IP address well you have found the right article for now we will just use sample.com as an example There are three different ways you can do this task and we will cover all three and the pros and cons if any to doing this also we will talk about how to assign another domain name to them. At this point you should have Internet Information System installed on your server if not do a search on this site on how to do that and what you all need to do. So say out public IP address is 208.152.142.22 and it is assigned to sample.com its best to deal with the same domain name place for all of your needs if not I suggest using Yahoo Domains or my Favorite
http://registar.com the reason I prefer them is they have their own DNS and they offer more features included in the standard domain purchase. domains work in levels let’s start with the top level here are some examples of the root domains (at this time there are dozens of top level domains)
.Net
.Com
.Us
.Gov
So we have sample.com the .com is the top level and the sample is the secondary domain this way sample.com is different than sample.net. Are you following so far? Good! Now we will get to the host header so we have a website say a business website located at sample.com and we want to add a new separate site for sales or even another company so we think of any word say “sales” for this example so we create a new website in IIS and when it asks you for a host header type in sales.sample.com so now we have a new website that is completely different so go into your browser and type in sales.sample.com your new website should show up (this is not always the case) so there is a couple steps we can do to make sure this works. First enter IIS and right click your new website choose properties Now click on the Website Tab on top and choose Advanced make sure you have the following sales.sample.com and
http://sales.sample.com ok so you have that try it again. Did it work? If it didn’t there might be 3 different reasons why this is not working;
1. Your firewall is blocking the incoming traffic
2. Your router or cable or DSL modem is not allowing internal connections out and then back in to your internal network. This is a common problem check the website from a computer outside of your network if it works then you can set the hosts file on the local machine so you can access it internally (you can also setup DNS but we will skip that since this is a beginner ‘s article) do the following; click on start button then search (make sure search hidden and system files is checked then type in hosts open this file up with notepad and enter in the web address in the first column tap the tap key and enter in your local IP address of the server. Note: the default address for the hosts file is located here C:\Windows\System32\drivers\etc
3. You have Windows Small Business Server and DNS is set up in this case search for DNS How to on this site. The next way to handle this is with a Virtual Directory such as
http://sample/sales this is the easiest method and you see this at hosting places like tripod but the downfalls are that it usually requires a extra fee from most domain name providers registar.com this method is included in the standard. The other downfall is your site is really not separate from the main site it is a sub site “a folder in a folder” to create a site with this method enter IIS and right click your main site and choose new then Virtual Directory . Pretty simple and if your main site works this will definitely work. The last way is using a Port method in this case our main website is located at sample.com which is by default port 80 to create a new website leave the host header blank and afterwards right click the new site and choose properties then on the website tab give it another port number such as 39 if we use this port our new website will be located at sample.com:39 now for kicks try it in your web browser. Did it work? If yes then you are golden if not check the following;
1. Make sure your Router/Modem firewall allows connections for that port
2. Make sure Windows Firewall allows that port Ok now that we have a separate site created what if we want to change the domain name to freestuff.com then do the following two steps;
1. Go to your domain name provider for freestuff.com and enter in the actual website you created such as sales.sample.com , sample.com/sales or sample.com:39 after that if your type in freestuff.com it should take you to your new site well, it will probably say sales.sample.com ext in the address bar instead or freestuff.com we can change that
2. Go into IIS right click the new site choose properties then choose the website tab and choose Advanced now what we need to do is add a alias for the new site so enter in freestuff.com for the host header.
And there you go I hope this article helps if even in a small way make your life easier.