When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles [1.x] [2.0]
ASPFAQs.com
Message Board
Related Web Technologies
User Tips!
Coding Tips
Search

Sections:
Book Reviews
Sample Chapters
Commonly Asked Message Board Questions
Headlines from ASPWire.com
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Security
Stump the SQL Guru!
Web Hosts
XML Info
Information:
Advertise
Feedback
Author an Article
Technology Jobs



















internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers
ASP ASP.NET ASP FAQs Message Board Feedback ASP Jobs
Print this page.

Business Systems Analyst - Clearing - SQL Server - ASP - VB (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume

Published: Wednesday, August 02, 2000

Using One I.P Address to Host Multiple Domains
By Rob Black


After reading a recent article by Erick Stover entitled Hosting Multiple Domains on One IP Address, I just had to tell the world (well, people that don’t already know) that there is an easier, and probably faster, way to do this.

- continued -

In the aforementioned article the author explains how to create an ASP page that will check for the domain name requested by the client and automatically send the client the correct page for that site. This will all work just fine but in my opinion it is slow and more difficult to administer than "Host Header Names."

Host Header Names are a feature of Microsoft Internet Information Server (versions 4 and 5, I’m unsure about earlier versions) that allows you to operate multiple domains from one I.P address. As far as I can tell, using IIS to run more than one domain name from a machine with a single I.P address will work in much the same way as the ASP based solution except that the server does all the work for you.

Below is a screenshot of the Host Header Name configuration window as it appears in the Internet Services Manager. (We are using Windows 2000 Advanced Server so the screenshots may differ slightly from your system)

The column on the left is for your I.P address, since I only have one address, and that address is subject to change, I use (All Unassigned), the second column is your Port number and the third all-important column is for your Host header Name. This is the name that people will have typed into their web browser in order to access your site. In the example, the Host Header Name in use is after12.sale.net. This is a test website running over our intranet but the host header names function just the same way. If I type http://after12.sale.net in to my browser, the site comes up, even though my machine has only one I.P address.

If your site is on the Internet, you may use a Host header Name similar to this: www.mysitename.com

Here are a bunch of sites on this machine and their associated host header names:

To access the Host Header Name options, do the following:

  • In the Internet Services Manager, Right click on one of your sites and choose "properties" from the pop-up menu.
  • In the "Website Identification Area" of that page click on the "Advanced" button.
  • Now select your site in the "Multiple Identities For This Website" area of the page and click on the "Edit" button.
  • In the edit window type your chosen Host Header Name into the appropriate box and click OK.
  • Click OK on the other open options windows to close them all and save your new settings.

That's about all there is to it, although in order for you to run this on a single machine you must have some kind of DNS system up and running although you do not need a real (internet registered) domain name.

Happy Programming!


Rob Black
ASP/SQL/.NET Developer


Windows Internet Technology | ASP.NET [1.x] [2.0] | ASPMessageboard.com | ASPFAQs.com | Advertise | Feedback | Author an Article


The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers