Heidi Manway wrote:
> Hi how do I block a Website with a HOSTS FILE?
>
> Is it possible.
>
> Regards,
>
> Heidi
>
You do it by putting an entry in to the Host file that uses the Loop
Back IP of 127.0.0.1, which points back to your computer.
As an example, if you put in an entry for
www.microsoft.com and an IP of
127.0.0.1 in the Host file, that will stop anyone using a browser from
accessing the site if they give
www.microsoft.com in the address bar for
the browser or if it was a URL in an email pointing to
www.microsoft.com.
The Host file is actually a Domain Name Resolution file. Anytime you
give an url like
www.whatever.com in the browser, an url in an email or
url in a body of a Web Page is accessed, the IP to the Web site must be
looked up. In all case, there is a Domain Name Server on the network
(your ISP's network) that your computer accesses to resolve
www.whatever.com to the IP of the site so that your computer with the
browser can access the site.
If there is a Host file present on the computer, the O/S, Windows XP as
an example, will look in the Host file first before it goes to the ISP's
DNS to resolve the
www.whatever.com to an IP.
If
www.whatever.com is present in the Host file and is pointing to the
127.0.0.0 Loop Back IP pointing back to your machine, then the access is
blocked to the site.
However, if someone wants to access
www.whatever.com, all the have to do
is give the real IP to the site in the browser not the
www.whatever.com
and they will be able to access the site, because the IP doesn't have to
be looked up via the Host file or the IPS's DNS on the ISP's network.
The Host file used in blocking access to a site is a limited means of
blocking access to a site. Also, malware seeks out a Host file and
circumvents and defeats the Host file in site blocking, if the malware
hits the machine and is executed.