Improve your security and privacy by blocking ads, tracking and malware domains. https://hblock.molinero.dev
  • Shell 87.4%
  • Makefile 5.5%
  • Roff 4.4%
  • M4 2.7%
Find a file
dependabot[bot] 8bce7f687f
Bump actions/checkout from 5 to 6 in the github-actions-all group (#191)
Bumps the github-actions-all group with 1 update: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 5 to 6
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-all
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-20 23:09:24 +01:00
.github Bump actions/checkout from 5 to 6 in the github-actions-all group (#191) 2026-01-20 23:09:24 +01:00
resources Fix APKBUILD 2026-01-20 22:04:09 +01:00
.gitattributes Converted LF to CRLF in test file 2021-02-23 22:11:46 +01:00
.gitignore Improved package creation 2020-10-18 16:22:25 +02:00
BSDmakefile Prefer "command -v" over "which" 2020-10-21 23:25:18 +02:00
hblock 3.5.1 2025-03-12 19:56:23 +01:00
hblock.1 3.5.1 2025-03-12 19:56:23 +01:00
hblock.1.md 3.5.1 2025-03-12 19:56:23 +01:00
hblock.sha256 3.5.1 2025-03-12 19:56:23 +01:00
LICENSE.md Remove year from license 2023-01-19 00:11:09 +01:00
Makefile Preserve PATH value in tests 2024-05-06 19:58:45 +02:00
PACKAGES.md Add Fedora package in PACKAGES.md (#153) 2024-02-14 22:00:04 +01:00
README.md 3.5.1 2025-03-12 19:56:23 +01:00
SOURCES.md Add Red Flag Domains list 2025-03-08 15:04:10 +01:00

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.

Installation

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.5.1/hblock' \
  && echo 'd010cb9e0f3c644e9df3bfb387f42f7dbbffbbd481fb50c32683bbe71f994451  /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.

Usage

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.

asciicast

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.