is it a file of actual websites visited by my computer or is it a file automatically generated for use? the host file i am inquiring about isnt the "example" one ..its the one in the "ect" folder
Five answers:
anonymous
2007-06-17 14:30:19 UTC
You hosts file is like a telephone book. Your computer uses it to look up a website IP address from the websites name before it queries your DNS server by for the same.
The hosts file that is default on a computer has only one active entry:
127.0.0.1 Localhost
for probably 99.9% of all computers this is the only entry.
Websites and their IP addresses must be manually placed in your Hosts file, your computer can not do it automatically.
All hosts files when using Windows XP are in the etc folder.
It is not a file of websites visited. To find them (when History has been deleted),one must decode your index.dat files.
heasutbla
2007-06-17 21:30:35 UTC
The hosts file you are referring to is not a list of websites visited by your computer. It is a file that will map a hostname to an IP address, that the computer user can control.
You could edit this file to -for example- block certain ads and cookies. Also, this file could possibly be "hijacked" by malicious spyware and other programs to redirect you to another site.
There are a lot of websites that will give a very detailed description of how it works, and example changes you can make to your own hosts file. I will list some in the sources section.
anonymous
2007-06-17 21:35:43 UTC
The hosts file is a throwback to the days before DNS servers were commonplace. It hard-codes the Internet addresses of named hosts. In general, this is a bad idea, because host addresses can and do change. The only hosts which should be listed in your hosts file are those on your local network or other sites which cannot be looked up via DNS.
Bean
2007-06-17 21:34:43 UTC
This file is used to map domain names, like google.com, with their associated ip addresses. When you type an address in your URL box and hit go, your browser first checks this file to find the valid ip address because computers communicate through this address, not by names. If the hosts file does not have an entry for the site you want, your browser will go to a remote DNS server, usually provided by your ISP to get the ip address.
So to experiment, you can take the ip address of yahoo.com, which is 216.109.112.135, and assocaite it with google in the hosts file to look like this
127.0.0.1 localhost
216.109.112.135 google.com
So now, everytime you type in google.com in the address box of your browser, you will actually get yahoo's website! It is also faster to retrieve the ip address from your computer than it is to get it from the DNS server.
Michael C
2007-06-17 21:22:25 UTC
well,
it depends on what configurations you chose. Usually, the default is the "auto generator"
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.