Working with the Hosts File on Windows XP
(Page 1 of 4 )
You would be amazed at the number of things you can do with the Hosts file on Windows XP. This file is most commonly used to resolve IP addresses; from this ability springs a variety of uses. In this article we'll take a close look at what else the hosts file can do for you.
There are actions that we perform every day automatically when surfing the web, and very often we don't ask ourselves what we're actually doing. For example, we type the URL of our preferred website into the address bar of our browser, and if all goes well, the site is displayed on our computer's screen. But what's going on behind this process?
Well, what the browser does is attempt to establish a connection to the computer which is currently hosting the website that we want to access. But for this to be done successfully, behind the scenes our computer is running some tasks that are worth describing in more detail. In the previous example, assuming that we're performing a search through Google.com, our browser tries to connect to a host with the IP address 74.125.45.100 (assuming that the folks at Google haven't changed this by the time of this writing).
Naturally, to resolve the domain google.com to this specific IP address, our computer first determines if the address is not its own local IP address (the so-called loopback, usually identified as 127.0.0.1). If this isn't the case, it attempts to perform the resolution process using a local text file named HOSTS, and then it looks at the DNS server of the ISP; finally, it looks sequentially at the DNS servers that are available online.
As I mentioned before, the earlier IP resolution process involves a local text file named HOSTS, which in the case of Windows XP is usually located under the C:windows system32driversetc folder. In simple terms, the HOSTS file acts like an address book in which it is possible to associate a domain name to a specific IP address, which can be used for multiple purposes, including blocking unwanted hosts, speeding up navigation across websites, and even creating neat shortcuts to them.
Of course, the HOSTS file can not be considered a panacea, but due to its considerable functionality, it deserves a deeper analysis. Therefore, in the lines that follow we will explore together the potential uses of this file in specific cases, so you can utilize it for fitting your own needs. Let's get started right now!
Next: Mapping host names to IP addresses >>
More Windows Security Articles
More By Alejandro Gervasio