--------------------------------------------------------------------------------

I'm making a internal website for my company that will run a program and preform an inventory of that computer. i have it all set up with the iis and its up and running if you type in the its location, now what i'm wondering is this, is there a way to have it setup so that when i type something like Inventory in the browser will that work. pretty much i just want a way were i don't have to type in the location.

Dani AI

Generated

Short answer: give the site a short internal name in DNS and bind that name to the IIS site. That avoids touching every client machine and keeps the name manageable if the server IP changes.

Practical steps (Windows Server 2003 / IIS 6): create a DNS host (A) record for the name you want (for reliability use an FQDN like inventory.company.local), then on the IIS server open the website’s Properties → Web Site tab → Advanced (next to IP address) → Add and enter the host header value that exactly matches the DNS name. Test name resolution with nslookup <name> and clear client cache with ipconfig /flushdns if needed.

Caveats and troubleshooting: editing hosts is fine for a handful of machines (as noted) but not scalable — use DNS as and suggested. If you use Integrated Windows Authentication and browse the site from the server itself you may hit the loopback check / auth issue; Microsoft documents fixes that add the host to the BackConnectionHostNames list (preferred) or disable the loopback check (last resort). Name-based host headers do not work with HTTPS on IIS 6 (no SNI), so you’ll need separate IPs for SSL sites. If the site doesn’t respond, confirm the host header exactly matches the request, verify IIS is listening on port 80 (netstat -an | find ":80"), and check firewall rules.

For completeness: WINS+host-header tricks (mentioned by ) can work in pure Windows/NetBIOS environments, but DNS is the simpler, long-term solution. As warned, avoid manual hosts edits across many workstations — use DNS, deployment scripts, or an automated startup script if you must distribute a hosts file.

Recommended Answers

All 11 Replies

Do you have an internal DNS server?

I know of a lot of companies do something similar to this. You could set up a virtual host on the IIS server (i'm not sure how to do this, so I'm speaking vaguely), and point an IP/hostname combo to it. So, you could have an "Inventory" hostname resolve to the virtual host's IP address, make the virtual host's index.html (or whatever your index file is) actually point to the page containing your inventory.

The easiest thing to do is modify each of the client machines host file, adding an entry to the server's ip address to whatever name you want.

The easiest thing to do is modify each of the client machines host file, adding an entry to the server's ip address to whatever name you want.

how, what, where, when. ok leave out the last one.

The easiest thing to do is modify each of the client machines host file, adding an entry to the server's ip address to whatever name you want.

If you add the name to the company's dns server you don't have to do anything on each machine.

The easiest thing to do is modify each of the client machines host file, adding an entry to the server's ip address to whatever name you want.

unless you have 500 workstations... :lol:

Seriously though, do what the other guy said and use DNS. If you really want to edit the hosts file on every machine its in:
%systemroot%\system32\drivers\etc\hosts

Hello,

You GOTTA be kidding to edit the hosts files on all the machines. NO! By doing that, you loose all flexibility of managing the name if it should change down the road. Unless there would be a way to do it via group policy, don't even try to do that.

DNS is the way to go with this project.

Christian

Well, if you have WINS running on your network, you could also add a WINS alias and use host headers in IIS.

I use this regulary to publish short & simple, non-FQDN names for intranet sites, such as or and keep them all on the same server/IP address, without havig to resort to sub-directories.

Though you do have to have WINS set-up, its the same idea as DNS, you just dont need to worry about configuring DNS or having your domain suffixes set up correctly. However, it does only work in Windows environments, and you can only host more than one web server per IP address only on Server editions of Windows.

I'm just curious, what exactly is the point of that host file? I was checking out mine and the only ip listed is the loopback, but theres a huge list of domain names there. What's it for?

I'm just curious, what exactly is the point of that host file? I was checking out mine and the only ip listed is the loopback, but theres a huge list of domain names there. What's it for?

Operating systems use the local host file to resolve host names to ip addresses.

Ah. So say I'm running a webserver on my machine and I want other computers on my lan to access it I would just create an entry with a name and next to it the ip of the machine running the web server?

For example, if my web server is say the entry would look something like the following?

//webserver

?

Ah. So say I'm running a webserver on my machine and I want other computers on my lan to access it I would just create an entry with a name and next to it the ip of the machine running the web server?

For example, if my web server is say the entry would look something like the following?

//webserver

?

No, the hosts file is only for the local machine that it resides on. To allow machines on your network to access your webserver by name use DNS.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.