Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How does one specify a different domain name for the localhost domain on an IIS server? I am setting up an IIS on a pc. I want a more user friendly name. The server will not be accessible to the outside world. It will only be on a home network. I shouldn't have to buy a domain name to do that. This is all new to me, so I am looking for information about how to specify that user friendly name, e.g. http://mypages/file.php instead of http://localhost:82/file.php

share|improve this question

Configure host headers on the site for whatever name you want to connect to it as. You'll also need some type of name resolution mechanism (DNS, Hosts file) that will resolve the name to the correct ip address.

share|improve this answer
Note: a host header is not necessary unless IIS is running a different site on port 80. Otherwise this site only needs to accept connection on port 82 regardless of the host header – uSlackr Aug 9 '11 at 20:29
True. I didn't read the question carefully enough. Thanks for catching that. – joeqwerty Aug 9 '11 at 20:32

You are describing a DNS setup. There are a couple steps to this. First, you need to know the IP address of the PC. Once you have that address in hand, you need to configure DNS to translate the name you want to use into the address of the PC.

Often times, your home PCs are pointing to the router for DNS resolution. If so, and your router supports it, add a DNS entry for mypages that points to the PC address.

If you cannot configure DNS, then it's a bit trickier. You could run your own DNS (not trivial) or you could update the host file on your PCs to translate the address for you.

Once you have DNS set up, you can access the site as http://mypages:82. If you want to remove the :82, then you'll need to configure it (look at the IIS site properties and click the advanced button next to IP address) to add port 82. You will ned a host header entry if IIS is running a separate site on port 80.

share|improve this answer
Googling configuring DNS turned up a lot of technical information without a lot of practical step by step instructions. How do I do that. I finally found information about editing the host file. I thought if I just added an entry to the host file like this 192.x.x.x:82 mypages that this would sufficient. But this was not. Seems to make sense that this could be the way to specify a name for that ip address. What are the proper steps? – user823527 Aug 9 '11 at 23:28
Your entry is correct except remove the :82. That is not part of the IP address which is all this fixes. Make sure there is no leading # on the line. to see if it is working, try pinging mypages ('ping mypages' from a command shell). It should resolve the name to the address even if the ping fails. – uSlackr Aug 10 '11 at 13:28
Thanks. This works. – user823527 Aug 10 '11 at 15:33

Found this answer to specify a name for my website.

  1. Right-click Notepad and Run as Administrator.
  2. Open "hosts" file from c:\Windows\System32\drivers\etc.
  3. Add one line to specify a hostname for the pc like this. Fastpc

With this you should be able to access the root for the IIS server from you browser by typing in the address the following.


If you have several sites from the root site, you can add their directory name to that address, e.g.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.