0

A common way to test an existing website on a new server before switching it to production by updating the DNS record is to change the hosts file on a development machine (/etc/hosts on *NIX systems, and %windir%\system32\drivers\etc\hosts on Windows), to have the OS resolve the hostname of the server to the new server. The developer can thus test the new server in real conditions before the actual deployment.

Now, changing the hosts file also has some downsides, among which:

  • the developer might forget to remove the change, with possibly undesired effects on the long term
  • the change requires administrative access on the machine

Hence the question: is there a way to do this change only within the browser (for Firefox, Chrome, and/or MSIE)? Looking for Firefox, I've found two or three add-ons, but they all do the same: modifying the OS-wide hosts file.

I'm looking for a self-contained lightweight solution working on both MS Windows and Linux, that does not require administrator privileges (so I can for example have students do that on their lab PCs), and without any external hardware/services (e.g. a router doing DNS spoofing or a proxy server doing the same).

  • 1
    Point the browser to a proxy and do the rest in the proxy. – kasperd Aug 1 '15 at 22:08
  • @kasperd That's a possibility indeed, although I would prefer a "lighter" solution. – Ale Aug 1 '15 at 23:09

Your Answer

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

Browse other questions tagged or ask your own question.