Switch your host/IP mappings in real time without editing your hosts file
LiveHosts is a Chrome extension that aims at providing a working (even if sub-obtimal) solution to a common nuisance that many web developers have to deal with every day. If you have multiple versions of your websites sharing the same host names on multiple environments, you often need to switch the assignments in your OS hosts file.
Other extensions (like the life-saving HostAdmin) can help with the cumbersomeness, but changes to the hosts file usually take an inconvenient amount of time to actually affect the browser.
Unfortunately, there is no way to make Chrome direct requests for a hostname to a specific IP without a standard redirect - you could set up a smart HTTP proxy, but it's often not possible or not convenient.
This extension settles for a sub-obtimal approach: requests to the indicated hostnames are redirected to the chosen IPs with an additional Host header. The browser's address bar reflects this behaviour showing the hostname right after the IP (e.g. http://127.0.0.1/www.example.com/). The extension also tries to take care of all requests to either the IP or the hostname in a consistent way.
Issues
After the redirect, the user is effectively in a different domain that the one they expected. They may notice some functional differences:
- depending on the server, parts of a web page referring to the site URL (like href and src attributes) could be different from the original
- window.location has a different value that can potentially throw off JavaScript snippets
- most Cross-Origin request won't work
Latest reviews
- (2023-10-10) Serge: Действительно работает =) Перепробовал все их, это единственное, которое на сегодняшний день работает. Да ещё и по вкладкам работает. Одни вкладки на оригинал сайта, другие на тот же сайт на виртуальной машине – всё прекрасно работает.
- (2023-09-06) Ree Wankko: 不是我希望的能替代 /etc/hosts 的插件,他只是修改了请求的host,这实际上会造成各种异常情况,就想别的评论中说的一样。
- (2023-08-30) Josue Garcia: The extension is not working on Chrome, but runs very well on Firefox, is there something to make it work on google chrome?
- (2023-08-25) Null Null: It's already been said in comments here, but this does not do what it says. It rewrites the URL and replaces the domain with the IP you specify. This is absolutely no good for servers doing SNI!
- (2023-07-15) Renato Frota: PT-BR. Vou dar 5 estrelas pela criatividade, mas no mundo atual, em que HTTPS já se tornou o protocolo padrão de fato e as diversas proteções CORS (Cross Origin Resource Sharing) também já estão bastante comuns, a extensão não tem mais valia. Recomendo o serviço SkipDNS, que não depende de extensão e funciona até mesmo em dispositivos móveis, sem necessidade de configuração prévia por parte das outras pessoas com quem você quiser compartilhar o link de pré-visualização. English. I'll give it 5 stars for creativity, but in today's world, where HTTPS has become the de facto standard protocol and the various CORS (Cross Origin Resource Sharing) protections are also quite common, the extension has no added value. I recommend the SkipDNS service, which is extension-free and even works on mobile devices, with no prior setup required by the other people you want to share the preview link with.
- (2023-06-29) Artem G.: Єдине розширення яке запрацювало так, як очікувалося.
- (2023-02-17) Smith寰子: 什么鬼东西,发出去的请求中的host居然是ip地址?开发者有基本常识吗?
- (2022-06-23) Marco Martorana: Non funziona come dovrebbe, non sostituisce la necessità di modificare il file hosts
- (2022-06-22) James Bowyer: It works for viewing test website while building them, Does not work with SSL's but as a website buidling tool very helpful The only thing its missing so I have to bring it down to 4 stars is a enable and disable button on the records so I had to keep typing them in everytime
- (2022-04-21) Fanatics Developer: It does not work as it rewrites your url to use the desired IP instead of the dns address. It does not work because when the browser tries to match the SSL certificate with the domain name they'll never match!!!
- (2021-12-30) MiYiTaN: Perfecto para editores web como yo, puedes tener una web con el dominio apuntando a ella y otra que estés creando nueva sin tener que apuntar el dominio a esta última, a veces tarda, pero es genial poder ver en el mismo navegador un mismo dominio y dos webs :D
- (2021-12-14) David Campbell: So incredibly simple. I no longer have to edit my hosts file and best of all, I can choose to enable it in only one tab. This is genious for my needs. Thank you =)
- (2021-10-26) Jangwon Han: Thanks. It helps!
- (2021-10-11) Alex Zeleznikov: It just rewrites the URL it does not update DNS/hosts file, doesn't work at all
- (2021-08-23) Robert Moore: This does not work as I was expecting. It simply changes the URL in the Address bar to the IP.
- (2021-05-04) Kenny Griffin: The concept is cool, but it doesn't work for me. Installed it on a Mac on the latest version of Chrome. I input the settings and saved them, no redirects happened.
- (2021-03-06) klemn 02: Only one I found so far that works. Great job
- (2020-12-26) Ryan Sullivan: It did the basics of what I was wanting it to do, but I was hoping to have the ability to also put a non-default port on the end of the IP address that it could use for that host name instead. That seemed to take Chrome back to as if I didn't have the entry at all.
- (2020-07-05) Rahi Dehzani: Just to the point and functional.
- (2020-04-14) Luke Wayne: Hard to use
- (2020-03-03) Ultra Já: Muito boa! Recomendo!
- (2019-11-27) tague _: It's a nice concept, but it doesn't really work perfectly. Redirects break the system, so for example if I want to test a virtual host for "foo.mysite.com" on a local server 192.168.x.x, but the main page of "foo.mysite.com" specifies a redirect to "/login", for example, the mapping won't kick in again and it'll try to send me to 192.168.x.x/login without faking the hostname being used, so the virtual host doesn't end up being used. The same also happens with HTTP-to-HTTPS redirects.
- (2019-10-07) Ellis Benus: I don't think this will work with WordPress on a Local Web server installation? B/c it's changing the URL to IPaddress/wp-admin the server doesn't recognize it. Is there a way to make this work with WordPress on a WAMP installation?
- (2019-09-30) yw662: Guy, the behavior is incorrect. First of all <IP address> is not the same origin of <Hostname>. Chrome will consider the two sites in a totally different way. The request is correctly sent, and the server should work, but the thing is at the client side: Chrome does not work this way. Secondly it wont work with HTTPS. The certificate returned by the server is for <Hostname>, not for <IP address>. Surely it is still useful some way, but what I am really looking for is sth. that works exactly the same way /etc/hosts works.
- (2019-08-21) Payam Baharan: firstly, sorry for poor English language I have a live site and a local copy of it on xampp that I work on it for testing. I established a virtual-host in xampp server config to work on local version, I have to add "127.0.0.1 example.com" in host file to open site with domain instead of "http://localhost/" then by commenting this line I access to live version your addon worked for me but the URL start with 127.0.0.1 not example.com is there any way to solve this problem?
- (2019-07-29) Supertyp (999): It doesn't work for me at all? I give it a real hostname and an internal IP number but what it does is it redirects me to http://<given IP number>/<given hostname> Sorry, this makes no sense at all.
- (2019-06-18) Walter Antolini: non funziona su chrome in osx
- (2019-05-06) László Fodor (emul): I'm not sure if I do something wrong or this extension is really not doing what it states. What I expect is that if there is a host test.dev which originally points to 1.1.1.1 and I want to try out another server with the same hostname then I add the new ip to the /etc/hosts like: 2.2.2.2 test.dev I tried the same with this plugin and all it does that it rewrites the URL of test.dev to 2.2.2.2 which makes no sense as it wont be caught by the same web server config
- (2019-03-10) Lan Mai: You save my life, man
- (2019-02-06) Inspired Earth: UPDATE: I wrote the below review too soon, just based on the description of the extension. I was that excited. I've since discovered it has no effect at all in my browser. Will update this review if that changes. The other reviews are so recent, I don't think it's that the extension is outdated, at all. Will see what I can do. ORIGINAL REVIEW Absolutely brilliant. As a web developer and server admin, I often have to work with two versions of the same site (and old copy, and a freshly migrated copy, on a new server, for instance). I've had to rely on changing the Host file, clearing Mac OS cache, and then closing Chrome as it seems to retain DNS data even after I use its hidden option for clearing that data. It's a pain. This extension is perfect. Thank you. Please keep up the great contributions.
- (2019-01-29) Troic Bah: Does what it says it does, perfect. There are so many extensions which do not do what they claim to do (i.e. host swtich +). This lets you munge /etc/hosts without munging /etc/hosts. No more clearing DNS [not that it easy to inspect any more on newer chromiums, logging to file after the fact is v.poor substitute.] Anyways fantastic extension, no more vi, Ctrl-Shift-N. Saves lots of time.
- (2019-01-20) Perfect! Easy to use and understand. I previously tried another extension which didn't work with HTTPS hosts, but this one did exactly what I needed 👏🏼👏🏼👏🏼
Statistics
Installs
10,000
history
Category
Rating
3.325 (40 votes)
Last update / version
2022-03-29 / 2.0.0
Listing languages
en