How to: Check your Hosts File

Sometime when a computer can not get to a certain website, the problem can be their hosts file. The “hosts” file is used by your operating system to associate host names with IP (Internet Protocol) addresses. For a www (World Wide Web) address to work it must first be translated into the IP address.
In English, this means that a computer sees yahoo as a number (66.94.234.13) and not the name yahoo.com. When a change is made in the hosts file, it tells the computer, if you’re looking for 66.94.234.13 goto www reallybadsite com instead.
This is going to be a really simple step by step with pictures for anyone that has never check their host file and may need to (my family)

1. click the “start button” and choose run, in the text box type c: and hit ok.

2. A window pops up with the contents of your C drive, scroll down until you see your windows folder. Double click it to open the folder.

3. You may now see a page of folders or you may see a message like the below image. If you see the files are hidden page, click the “show the contents of this folder” at the bottom of your message.

4. With the list of directory folders now showing, we want to scroll down until we find the system32 folder. Double click it to open it.

5. Again if the “these files are hidden” message comes up, click “show the contents of this folder” at the bottom of your message. The next folder we are looking for is Drivers. Again double click and open.

6. The next folder we are looking for is etc, double click.. oh you know.

7. Inside the etc folder are a few files, we want the hosts file, it will probably look like the below image since windows doesn’t know what to open it with.

8. Double clicking on the hosts file will bring up a window asking what program you want to open the hosts file with. Scroll down till you see wordpad, click wordpad and then click ok.

9. Wordpad opens showing the contents of your hosts file. A clean hosts file will look like this..

# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a ‘#’ symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host

127.0.0.1 localhost

If you have more addresses listed, this is when you need to check and make sure that someone in the family didn’t add them, a adware/spyware protection program didn’t add them to protect you or that they were put there by a virus or by spyware. This will give you a start on figuring out some of the problems you may have been having trying to get to certain sites.

Technorati Tags:

     

2 Comments to “How to: Check your Hosts File”

  1. Tim Hibbard 15 January 2007 at 2:25 pm #

    For windows Vista, you need to take additional steps outlined here.

  2. Curbob 15 January 2007 at 6:15 pm #

    Thanks Tim, this will be helpful in the very near future.


Leave a Reply