Is there any Firefox plugin that allows to change how Firefox perform name resolution? I want to override the system-wide hostname resolver to attach some IP to certain hostnames.

Let me explain. Let's say I'm developing a new website and I want to test using the actual hostname but my site is run by a local webserver, I'd like to do this:

System-wide resolver: www.domain.com --->
Ovveride by addon:    www.domain.com --->

Is there anything like this? Thank you.


You don't even need a plugin to do that. You can do it with the proxy settings. Specifically, you can use the proxy auto-configuration option with a PAC file that you create. The PAC file is written in javascript. For you it might look something like this:

function FindProxyForURL(url, host) {
    if (host=='www.domain.com'){
        return 'PROXY';
    // All other domains should connect directly without a proxy
    return "DIRECT";

Save this as my-proxy.pac file and point the proxy auto-configuration at it.

For more information on proxy autoconfiguration, see wikipedia: http://en.wikipedia.org/wiki/Proxy_auto-config


There are many Firefox add-ons that do just this:

  • HostAdmin
  • ChangeHosts
  • SwitchHosts

A search for "Firefox hosts add-on" will yield a whole lot more.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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