Skip to content
Hostfile blocklist for ads and tracking, updated regularly
Python Shell Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
HostsTools
docs
tests
.coveragerc
.editorconfig
.gitignore
.gitlab-ci.yml
.travis.yml
LICENSE
Makefile
README.md
ads-and-tracking-extended.txt
ads-and-tracking-whitelist.txt
ads-and-tracking.txt
amp-hosts-extended.txt
amp-hosts.txt
compare_hosts_lists.py
cron.bash
facebook-extended.txt
facebook.txt
pytest.ini
requirements.txt
secrets.json
sonar-project.properties
tracking-aggressive-extended.txt
tracking-aggressive.txt
update_hosts_file.py
whitelist.txt

README.md

Hosts

Build Status Quality Gate Status license last commit commit activity donate gitter

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.

Host file recipe Description Raw hosts
Ads & Tracking A programmatically expanded list of hosts I've found to not be on other lists. This list is very reliable and I recommend using it. link
Tracking Aggressive A very aggressive block list for tracking, geo-targeting, & ads. This list will likely break functionality, so do not use it unless you are willing to maintain your own whitelist. If you find something in this list that you think is a mistake, please open a ticket and we can discuss it. Keep in mind that this is an aggressive list. link
AMP Hosts Google's Accelerated Mobile Pages (AMP) are taking over the web. Block AMP pages with this list. Since I use DuckDuckGo, this list is pretty sparse and suggestions are welcome! link
Facebook A hosts file to block all facebook and facebook related services, including Messenger, Instagram, and WhatsApp. This is a pretty new list and I recommend using it with anudeepND's Facebook list as well to ensure full coverage. link

Adding a domain

Pre-requisites

  • Python 3.6 or later
  • pip3

Setup

$ make setup

Test

$ make test

Usage

$ python3 update_hosts_file.py --help

Examples

$ python3 update_hosts_file.py -d amazon-adsystem.com doubleclick.net
$ python3 update_hosts_file.py -update
You can’t perform that action at this time.