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 am trying to see if I can have a specific Hosts file that only a Proxy Server application on my machine will use while the remainder of the machine uses the normal proxy server.

For example, I want to take (and this is JUST AN EXAMPLE) and map it to However, I only want this to happen when connected to a proxy server application running on my machine.

Then I would configure Firefox to use the Proxy Server while IE doesn't use the Proxy server.

Could I use something like Fiddler, Charles, or some other Proxy/Debugger and have only that application use a custom Hosts file?

Why? This allows me to compare the live web site with what I have developed locally. Trust me, I need the host name mapping for a reason. I'm using HTML from the live site with local CSS changes. I need to compare those CSS changes to what is in Production environment.

share|improve this question
up vote 2 down vote accepted

Fiddler can do this. Using custom rules in it's CustomRules.js file, you can simulate the Windows hosts file by pointing one hostname to a different IP address. An example is provided on their script samples page:

// All requests for should be directed to the development server at
if (oSession.HostNameIs(""))
oSession.bypassGateway = true;  // Prevent this request from going through an upstream proxy
oSession["x-overrideHost"] = "";  // DNS name or IP address of target server
share|improve this answer
Latest version of Fiddler has a HOSTS mapping feature under TOOLS -> HOSTS that does exactly this same thing. I was originally using an older version that did not have the feature. Also, Charles Proxy has the same feature called "DNS Spoofing". – nopuck4you Jan 8 '10 at 17:38
How does this work for a specific browser? Where do you add it to make it work? – NoBugs Feb 20 '13 at 4:48

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.