In most operating systems, the hosts file is preferential to DNS. Therefore if a domain name is resolved by the hosts file, the request never leaves your computer. Having a smart hosts file goes a long way towards blocking malware, adware, and other irritants.

windows - blocking website via hosts file not working I think Kavitesh Singh made the most important point: Blocking the domain with and without www. this is the most common reason for an entry not working. Also, not all browsers immediately react to changes in the hosts file. Blocking websites via the hosts file - Android Help Dec 15, 2017

Block ADS via HOSTS file. - General Windows PC Help

Hostfile blocklist for ads and tracking A collection of hosts files for domain blocking. If you find something in a list that you believe is a mistake or breaks functionality, please open a ticket and I'll consider removing it. Also, if you find an unblocked subdomain of a blocked root domain, please let me know so I can add it to a list. Ads & Tracking: 167,038 hosts

c:\winnt\system32\drivers\etc\hosts Windows XP Home c:\windows\system32\drivers\etc\hosts Editing the file Edit. You shouldn't need to remove anything from the file so if you don't know what you are doing don't remove or change any of the line. Simply add the new lines below. Make sure 127.0.0.1 localhost is the first line on the file.

How to Use Your Computer’s Hosts File to Block Tons of Aug 01, 2017 4 Ways to Block YouTube - wikiHow