Improve your security and privacy by blocking ads, tracking and malware domains.
Alternatives To Hblock
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Hosts Blocklists2,273
6 hours ago8
Automatically updated, moderated and optimized lists for blocking ads, trackers, malware and other garbage
5 days ago62June 26, 20224mitShell
Improve your security and privacy by blocking ads, tracking and malware domains.
Dns Blocklists1,161
5 hours ago2mitText
DNS-Blocklists: For a better internet - keep the internet clean!
4 days ago82mpl-2.0HTML
World's most advanced DNS filter-/blocklists!
Nextdns Config431
17 days agogpl-3.0
Setup guide for NextDNS, a DoH proxy with advanced capabilities.
Little Snitch Rule Groups289
2 years ago1gpl-3.0Python
This repo provide rule groups for Little Snitch based on unified host list to block ads, malware, fake news and porn
a day ago1gpl-3.0
DNS Block Lists
Url Sandbox113
7 months ago1agpl-3.0Python
Scalable URL Sandbox for analyzing URLs and Domains from phishing attacks
3 months ago19gpl-3.0Rust
Malware, advert and tracking blacklist
Block Ads Via Dns67
7 months agogpl-3.0Shell
Block ads and malware via local DNS server
Alternatives To Hblock
Select To Compare

Alternative Project Comparisons

Improve your security and privacy by blocking ads, tracking and malware domains.

What is this for?

hBlock is a POSIX-compliant shell script that gets a list of domains that serve ads, tracking scripts and malware from multiple sources and creates a hosts file, among other formats, that prevents your system from connecting to them.

⚠️ hBlock by default replaces the hosts file of your system, consider making a backup first if you have entries you want to preserve.


hBlock is available in various package managers. Please check the PACKAGES.md file for an up-to-date list.

The latest available version can also be installed manually by running the following commands:

curl -o /tmp/hblock 'https://raw.githubusercontent.com/hectorm/hblock/v3.4.2/hblock' \
  && echo 'a7d748b69db9f94932333a5b5f0c986dd60a39fdf4fe675ad58364fea59c74b4  /tmp/hblock' | shasum -c \
  && sudo mv /tmp/hblock /usr/local/bin/hblock \
  && sudo chown 0:0 /usr/local/bin/hblock \
  && sudo chmod 755 /usr/local/bin/hblock

Additionally, a systemd timer can be set to regularly update the hosts file for new additions.


The default behavior of hBlock can be adjusted with multiple options. Use the --help option or check the hblock.1.md file for the full list.


Nightly builds

Nightly builds of the hosts file, among other formats, can be found on the hBlock website.

Temporarily disable hBlock

Sometimes you may need to temporarily disable hBlock, a quick option is to generate a hosts file without any blocked domains by running the following command:

hblock -S none -D none

I found a false positive, what should I do?

It's possible that sometimes one of the hBlock sources includes a domain that shouldn't be blocked, in those cases the best way to proceed is to temporarily add said domain to the allowlist and report the problem to the original blocklist author. This way it will also be automatically removed from hBlock within 24h.

To find which blocklist is behind a false positive you can clone the hMirror project and search for that domain. Although please note that not all hMirror blocklists are used by default in hBlock, an updated list of the sources used can be found in the SOURCES.md file.

Popular Malware Projects
Popular Ads Projects
Popular Security Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.