Solved

how to use Host Headers in an IIS web dev environment

Posted on 2004-08-02
1
226 Views
Last Modified: 2010-04-20
With Windows 2003 Server Web Edition setup and functioning I am trying to use host headers to resolve on the LAN in order to ease testing of web applications.  So far I have verified that the server is working via port settings - i.e. - sitea:81 & siteb:82 - and so forth, but I a am trying to get the sites to resolve such as http://sitea.servername & http://siteb.servername.

I have setup a DNS host entry resolving servername to its IP address on the LAN.  I have entered host headers in IIS in the format sitea.servername as well as sitea - neither has allowed me to successfully resolve to any of the development sites locally, even after running an ipconfig /flushdns.

PLEASE HELP!!!
0
Comment
Question by:tcs1
1 Comment
 
LVL 33

Accepted Solution

by:
humeniuk earned 50 total points
Comment Utility
Unless you configure the sites to use the default port (80), you will have to continue to type the name of the website, ie. www.domain.com:85.

There is a good tutorial for Windows Server 2003 dns at www.simongibson.com/intranet/dns2003. A good place to start.  The best thing to do is take it step by step.  To quote myself from another post:

"I presume you have created your website and can see it under your server name in the IIS window.  Make sure you have entered your domain name (ie. domain.com) in the Host Header field in the configuration settings for that website.  (I will assume that you have chosen '(All Unassigned)' in the IP address field and, port 80 in the port field.

Next, open your DNS Console from the Administrative Tools folder.  Select your DNS server and double-click the Forward Lookup Zones to see the list of zones/domains registered on that server.  If you have not created a zone for your new domain (ie. domain.com), you can right click on Forward Lookup Zones and create it.

Doing this automatically creates two records, a Start of Authority Record and a Name Server Record.  Right click on your new zone and select properties.  There you can configure your SOA record (select the Start of Authority (SOA) tab - the default settings are probably adequate) and your Name Server Record (select the Name Servers tab), where you can add additional name servers (if any).

The final step is to create your Host Record (also known as your A record.  This maps a host name to an IP address.  Open your DNS console again, select your domain (ie. test.com) inside the Forward Lookup Zone.  Click 'Action' (beneath 'File' at the top of the window) -> 'New Host'.  The Location field will already be filled by the domain name (ie. domain.com).  Add a name that you wish to use, such as www (so that you can use www.domain.com) and the IP address of the IIS server (presumably 192.168.0.191 from your example).  Make sure the 'Create associated pointer (PTR) record' box is checked.  This will automatically make the corresponding PTR record, the record in the Reverse Lookup Zone that maps IP address to host name.  Click Add Host.

You should now be able to browse www.domain.com (or whatever your domain is) the same as 192.168.0.191"

I hope this helps.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now