Every single computer accessible through a network (including the network we know as "the Internet") has a unique numeric address known as an IP address. When you are using a browser or other client software, you normally type a URL into the software to specify what you want to see or where you want to take an action. Behind the scenes, this URL is converted into an IP address automatically so that a connection can be made between your client software and the remote server.
This conversion from URL to IP address is typically done using DNS servers. (DNS is an acronym for Domain Naming System.) What most people don't know, however, is that DNS servers are the second place for which IP addresses are checked. The first is a file on your system known as a Hosts file. The Hosts file is a text-based system file that defines the mappings between IP addresses and names. If the host name is located within the Hosts file, then your client software uses the IP address associated with it there rather than querying a DNS server.
The Hosts file lives at "C:\Windows\System32\Drivers\Etc\hosts" (it has no file extension). Since the Hosts file is nothing but a plain text file, you can load it using a text editor such as Notepad. (See Figure 1.)
Figure 1. An example Hosts file.
Notice that most of the lines in the file begin with a hash tag (#, sometimes called a pound sign or a sharp sign). These are comments and are ignored by Windows. Blank lines are also ignored. For lines that aren't ignored, they are formatted simply as the IP address followed by whitespace and the name of the host system (or server) corresponding to that IP address.
If you examine a Hosts file, you may even notice that some lines have a pound sign at a position other than the first character. These are comments, as well, and everything after the pound sign is ignored.
You can easily modify your Hosts file to add as many mappings as you wish. You can even use the Hosts file to prevent access to specified remote systems. Both of these topics are covered under separate tips.
This tip (12850) applies to Windows 7, 8, and 10.
We can make a lot of adjustments to our Web browser over time. If you ever want to restore your browser to its original ...
Discover MoreYour Hosts file is an important file as far as network communications go, and you can easily edit it to suit your needs. ...
Discover MoreIf your computer is Wi-Fi enabled, you can easily set it up to be a hotspot. This tip shows you how.
Discover MoreThere are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Copyright © 2024 Sharon Parq Associates, Inc.
Comments