Hosts File

The Hosts File is a simple text document that maps domain names to IP addresses. Back in the early days of the Internet, there was no Domain Name System and people kept the IP Address and domain name in a file called hosts.

Typically, when making a web request your computer will check this file and if no entry exists it will query a DNS server, to find the IP Address for a certain website. Your ISP will assign you a DNS server which they control and can log and record your activities.

A hosts file can speed up performance, block known ad/spyware/malicious websites before your browser even sends an HTTP request . A curated and compiled list of hosts files are useful for fending off these bad websites. Beware, some websites you go to might be blocked, so read through a file to see what is allowed or not.

The main idea is to set a bad website to the IP Address of 0.0.0.0 which blocks the call to the evil site.

Another cool way to block bad domains is with a DIY Pi-Hole, a DNS blocker device.

Hosts File Blocking Lists

DNS Tools and Links