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

Can I redirect a DNS entry to a local IIS instance? I am on a Windows 7 dev box.

I have a domain for hosting static content (images, custom js, css, etc) on a cloud environment. I'd like to avoid hitting that server during development of the site.

I can see two ways to do this:

  1. Create a virtual machine for the site in vmware and map the name to the virtual's ip in etc/hosts.
  2. Use a preprocessor macro to prefix image locations with the url for dev/stage/prod.

Is there an easier way to do this? After searching on SF I found unbound but it looks like its for *nix. Any other ideas?

share|improve this question
up vote 1 down vote accepted

Windows 7 supports hosts analog to Linux.

Just put the Servername you don't want to be hit in %WINDIR%\SYSTEM32\DRIVERS\ETC\HOSTS


This requires the static content to be mirrored on a local instance.

share|improve this answer
Yeah, my IIS settings were jacked, I got it to work. – blu Nov 6 '10 at 22:11

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.