Can I set a Hosts file just for one browser?

Kelemvor

Lifer
May 23, 2002
16,928
8
81
Howdy,

I'm working on moving my website to a new host. I have the new server up and can access my site via a hosts file entry. However, this makes all my browsers go to the new site.

What I want is so that I can use one borwser to hit the new site and one to hit the old site so I can do some comparisons and things like that.

Is there any way to do that via a plugin for Chrome or Firefox or anything like that?

Thanks.
 

Chiefcrowe

Diamond Member
Sep 15, 2008
5,053
196
116
I think your best bet may be to use a VM or another computer because you can't set different hosts files for different browsers, it is a computer wide setting
 

quikah

Diamond Member
Apr 7, 2003
4,160
719
126
Setup a proxy server that has the correct IP for the dev site? Can set one browser to use the proxy, another to not use it.
 
  • Like
Reactions: Bardock

DaveSimmons

Elite Member
Aug 12, 2001
40,730
670
126
This wouldn't let you use both sites at once, but you could write batch files or powershell scripts to swap 2 different hosts files in and out.

You could also have a script that does this:

- swap in the new hosts file
- run the browser
- wait for the browser to close
- swap back the old hosts file

My batch fu is weak so I can't do this for you, but someone in the Programming forum could.