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

I know that there is a way to make any defined URL resolve to a different URL, but I can't remember how or where to define this setting.

I understand this is ambiguous, so consider the following example. I am building I have set up the web site in IIS 7. However, I haven't forwarded the nameservers to resolve my server yet, so the URL points to somewhere else completely. However, when I access locally, I would like the IIS 7 website to be resolved.

How can I do this? Is this a setting in IIS, the individual browser (IE or Chrome) or somewhere else (like my network settings)?

share|improve this question
up vote 3 down vote accepted

The name resolution is handled through DNS so if you need the host to resolve to a different machine you would need to modify DNS. If you only want it to resolve differently for your test machine you could modify the \windows\system32\drivers\etc\hosts file on the machine you'll be browsing from.

Note 1: the typical location for hosts is under \windows, but you should check %SystemRoot% for the locaiton on your system.

Note 2: your AV program may complain if you try to edit this file.

You would have to modify your DNS server to change DNS. I can't tell you whether it is a local or internet based DNS.

share|improve this answer
The hosts.txt file sounds familiar. Where is that located? Also, where do I go to modify DNS? – smartcaveman Jun 10 '11 at 21:32
Linux/Mac uses /etc/hosts and on Windows you'll need to edit C:\Windows\system32\drivers\etc\hosts – Matt Beckman Jun 10 '11 at 21:39
Thanks Matt. Its hosts not hosts.txt. fixed above – uSlackr Jun 10 '11 at 21:41

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.