The so called Hosts File can be used to redirect hostname requests to different IP addresses.
It is often used to block access to websites or servers, to redirect requests to a new or local server, or by malicious attackers who redirect websites to honeypots and fake websites. Web developers can use the hosts file to work on moved websites before the DNS propagates.
The concept is pretty simple: When you move your website to a new host, you need to tell the DNS system that your domain name is now accessible on a different IP address. This DNS propagation takes up to 48 hours. When you load the website before propagation you automatically load it on the old server and not the new one. This can be problematic for web developers who want to check if the website displays correctly and without errors on the new server. That's where the host file comes in. You basically force your computer to use the new IP address instead of the old one to open the domain name in the web browser.
Check out our Hosts Software overview for a selection of programs that allow you to work with the hosts file.
The Firefox extension Change Hosts adds those controls, and a lot more to the web browser. Many web developers use the Firefox browser, as it offers access to great web development tools such as Firebug. With Change Hosts installed, they can change hosts files with two mouse clicks.
When you first install the extension you will notice that it adds information to the status bar of the browser. Here you see the name of the active hosts file and the current server IP.
A right-click opens a context menu that displays all available hosts files in a menu, options to flush the Dns Cache, and to open the extension preferences.
The general tab displays whether the hosts file is readable and writable on the system, options to run another local file after changing hosts file, and whether pages should be automatically reloaded when a new hosts file is loaded.
The Definitions tab offers options to add, edit and remove hosts file. Hosts files can be edited right away in a basic text editor in the browser, and changes become available immediately after they have been saved. It is furthermore possible to copy and paste information from one hosts file to another, or from the clipboard directly into a hosts file.
Change Hosts is a great extension for web developers that work with the Firefox web browser. The ability to maintain multiple hosts files, for instance for different projects, plus the ability to flush the DNS cache from within the browser are useful features. Firefox users can download and install the latest version of the extension from the official Mozilla Firefox Add-ons repository.Advertisement
Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.
We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats or subscription fees.
If you like our content, and would like to help, please consider making a contribution:
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.