Preview

Blocking Websites

Good Essays
Open Document
Open Document
1267 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Blocking Websites
How to block a Website Ever felt the need to block certain websites. The Hosts file is like an address book. When you type an address like www.yahoo.com into your browser, the Hosts file is consulted to see if you have the IP address, or "telephone number," for that site. If you do, then your computer will "call it" and the site will open. If not, your computer will ask your ISP's (internet service provider) computer for the phone number before it can "call" that site. Most of the time, you do not have addresses in your "address book," because you have not put any there. Therefore, most of the time your computer asks for the IP address from your ISP to find sites.
If you put server names into your Hosts file with your own computer's IP address, your computer will never be able to contact the server. It will try to, but it will be simply calling itself and get a "busy signal" of sorts. Your computer will then give up calling the server and nothing will be loaded, nor will any tracking take place. Your choices for blocking sites are not just limited to blocking servers. You may block sites that serve advertisements, sites that serve objectionable content, or any other site that you choose to block.
Computers have a host address of their own - it is known as the "localhost" address, with an IP address of 127.0.0.1 which it uses to refer to itself. If you associate another computer's host name with your localhost IP address, you have effectively blocked that host since all attempts to access it will lead back to you. That is how we will block sites using the Hosts file. We will tell our computer that the IP address of the site we want to block is our own address. That way, our computer will not ever leave and go looking for the site we are blocking - which keeps that site from appearing because the computer thinks it has found the site and displayed it already.
There are some limitations though such as,
1. It will not work with wildcards, such as

You May Also Find These Documents Helpful