>I would welcome any helpful comments about HOSTS files.
I will try and keep it as simple as I can.
The internet runs on a protocol (language) called tcp/ip,
and every machine on the internet has an ip address, in
the format 123.123.123.123 (4 sets of numbers separated
by a full stop).
You can find your ip address by going into a DOS command
prompt and first typing hostname which will return your PCs
machine name (may not work in all versions of Windows).
Then type ping myhostname (replacing myhostname with your
machine name) and it should return your ip address.
When passing information round the internet tcp/ip uses
the ip address to find the right PC (a bit like a phone
number).
But to make it easy for humans to use, web sites can also
be known by their web site address, like
www.google.com.
But site
www.google.com will also have an ip address. You
can prove this by going into a DOS command prompt and
typing: ping
www.google.com
This sends a message to
www.google.com and you will get
a reply back. You will see the ip address is 66.102.11.99
The large servers that control the internet have a table
called a Domain Name Server (DNS) that links the web site
name with the ip addres.
So for google it will have:
66.102.11.99
www.google.com
So when you type
www.google.com in your browser the
domain name server knows to send it to 66.102.11.99
But before your machine sends a message to the DNS
machine it will look in your own HOSTS file to see if the
web site is listed there.
To the internals of Windows your machine is always known
as localhost, ip address 127.0.0.1. This is so that whatever
your 'real' ip address is Windows can always use 127.0.0.1
You can see this listed in your HOSTS file
So if you put the following in your hosts file
127.0.0.1
www.google.com
then your browser would try to find the google web site on
your machine, and of course it would fail.
So what this web site is suggesting is that by putting all the
'naughty' web sites in your HOSTS file and pointing to your
own machine you will fool tcp/ip to look for them on your
machine and not go to the 'naughty' web sites.
This may work fine for a home machine, but if you use your
machine for work it may already have entries in your HOSTS
file and if you make changes you could cause other problems.
If you want to try it, rename your HOSTS file to HOSTS.OLD,
then put in the new HOSTS file, THEN REBOOT, then see if
everything works.
Note that the file does not have an extension, like txt, it
is just called HOSTS.
You may not notice much at first, but hopefully it will stop all
these pop ups.
Guilbert