Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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'm in the process of migrating a forum setup from one version of the software on one machine (older shared Windows host) to a new VPS (Windows Server 2008). To install the software, I used my hosts file to temporarily point the domain at the new IP address. To see the old site, I obviously re-edit the hosts file to remove the reference.

But this leaves me constantly adding/removing a # from my hosts file just so I can switch back and forth between the two servers.

Is there a way to do this more rapidly? I've found a handful of toggling batch scripts, but all they do is automate the addition/removal of the # character ... so there's still a noticeable lag where I have to repeatedly hit F5 to force my system to detect the new settings.

Ideally, I could view both servers at the same time on the same machine. Maybe one through a regular browser session and one through some kind of a proxy. Unfortunately, I don't have the first idea how to set that up.


share|improve this question

migrated from Oct 5 '12 at 12:22

This question came from our site for professional and enthusiast programmers.

up vote 0 down vote accepted

Use a virtual machine or two to run, in effect, a second and third copy of the operating system, and keep each configured to use the appropriate host-IP entry.

Use a second computer entirely, such as a laptop, configured to use the appropriate host entry.

share|improve this answer
Not an ideal solution (requires extra hardware or software that I just don't have), but still the best I've seen so far. – EAMann Aug 30 '11 at 21:50

Seems like there are a number of small executables that will do this for you. I personally use this one which does a great job of just overwriting a few values.

If you had to do a lot of hosts, one of these might be better: or

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.