mrkeyoor.com_
Thu 24 Sept 07:39 UTC
Self-Hostedevaluationupdated 24 Sept 2026

hosts review

StevenBlack/hosts combines maintained domain lists into a hosts file that blocks adware and malware at the operating-system level. You can download the finished file, choose category variants, or run the Python generator with your own sources and exceptions.

Verdict

Our StevenBlack/hosts run installed 150 npm packages in 14 seconds, then its Python test failed in 1 second because requests was missing. Download the generated file if you want simple device-level blocking; it is the shortest and best-documented path. Run the generator only if custom sources and exceptions justify owning its Python dependencies, privileged file replacement, and false-positive handling.

We ran it

Lab card: what happened when we ran hostsScreenshot of hosts (github.com/StevenBlack/hosts)
Install✓ · 14s150 packages · 37 MB
Buildn/ano build script
Tests✗ · 1sran, no count parsed
Known vulns00 critical · 0 high · 0 moderate · 0 low (npm audit)
Repo313 files~4,513 lines of source · 85 MB · 4 CI workflows · Dockerfile

Answers from our run

Does hosts build from source?

Dependencies installed in 14 seconds (150 packages), and the project has no separate build step. We cloned commit dcf08b8 into a clean Debian container with 3 CPUs and no project-specific setup.

Do hosts's tests pass?

The test command failed in our container, and its output did not report a pass or fail count.

Does hosts have known vulnerabilities in its dependencies?

npm audit found none in the dependency tree at the time of our run.

Who should not use hosts?

Anyone who needs path-level filtering or a browser-style allow button: a hosts file maps whole hostnames, and the documented whitelist also matches subdomains.

What are the alternatives to hosts?

HaGeZi DNS Blocklists, Pi-hole, AdAway. Our StevenBlack/hosts run installed 150 npm packages in 14 seconds, then its Python test failed in 1 second because requests was missing.

Setup3/5Finished lists are easy; our Python test dependency was missing
Docs5/5Generation, variants, exceptions, and OS steps are documented
Community5/531,103 stars with issues and fixes active in September 2026
Maturity5/5Release 3.16.116 ships generated lists and several install paths

Who it’s for

People who want device-level domain blocking without running a DNS service.
Administrators who need ready-made variants for gambling, pornography, social media, or fake-news domains.
Tinkerers who want to merge their own mappings, blacklist, and whitelist into a generated hosts file.
Pi-hole and other DNS-tool users looking for a maintained source list.

Who it’s NOT for

Anyone who needs path-level filtering or a browser-style allow button: a hosts file maps whole hostnames, and the documented whitelist also matches subdomains.
Windows users unwilling to manage large-file and DNS-cache behavior: the README warns that disabling the DNS Cache service can affect WSL and recommends compression as an alternative.
Teams expecting npm install to prepare the test environment: our run installed 150 npm packages, but the Python test stopped because requests was missing.
Operators who need the project itself to provide query logs or a network dashboard: the repository produces hosts files and lists Pi-hole as a separate third-party application.
Environments where an occasional false positive is unacceptable and nobody can maintain exceptions: issue 3249 documented a corporate root domain being blocked until it was removed.

Setup reality

Our sandbox install succeeded in 14 seconds, adding 150 npm packages and using 37 MB. There was no build target. The test command failed after 1 second because Python could not import requests. The npm audit found 0 known vulnerabilities.

Using the finished hosts file needs no account or API key. Rebuilding it requires Python 3.6 or later plus the separate Python requirements, and updating its source lists needs internet access. Custom sources use update.json; local exceptions live in whitelist, blacklist, or myhosts.

Replacing the active hosts file requires system privileges and may require a DNS-cache flush. The Docker quick start mounts /etc/hosts and uses --replace; Windows has separate PowerShell guidance, compression options, and a warning about DNS Cache service changes affecting WSL.

The base file contains 76,510 blocked domains

The September 23, 2026 base file contains 76,510 entries drawn from maintained adware and malware sources. StevenBlack/hosts merges those inputs, removes duplicates, and maps the resulting domains to 0.0.0.0. A browser or app asking the operating system for one of those hostnames gets the non-routable address before normal DNS resolution. That makes the finished file useful without a background service, account, or browser extension. It also means blocking happens by hostname, not by page, request type, or user.

The repository publishes 31 variants in addition to the base list. Extensions cover fake news, gambling, pornography, and social media, either alone or mixed with the unified list. This is a better design than one giant maximum-blocking file because a family machine and a development workstation rarely need the same policy. Read the variant name carefully: an only list contains the chosen extensions without the base adware and malware collection.

An 85 MB clone is optional for ordinary use

Our checkout occupied 85 MB before installation, but people who only want blocking can download a raw generated file. The README warns that full history goes back to 2018 and recommends a shallow clone for anyone who needs the repository. That is sound advice here. Cloning, installing npm packages, and running Python are generator concerns. Copying the base file into a compatible hosts-file manager requires none of them.

Customization is the reason to take the longer path. The Python generator accepts additional data sources, four category extensions, a local blacklist, a local myhosts file, and a whitelist. Those local files are not tracked by Git, so an upstream pull should not overwrite them. One detail deserves care: whitelist entries use partial matching. Allowing google-analytics.com, for example, also excludes its subdomains from the generated blocklist.

What happened when we ran it

Our sandbox installed 150 npm packages in 14 seconds and used 37 MB on disk. The checkout at commit dcf08b8 contained 313 files and roughly 4,513 lines of source. There was no build script or target, so we skipped that step. The npm audit reported 0 known vulnerabilities across the installed packages. Those numbers describe our 3-CPU, 8 GB Debian container and the measured commit, not every installation method.

The test command failed with exit code 1 after 1 second. It launched python3 testUpdateHostsFile.py, which stopped on line 20 with ModuleNotFoundError: No module named 'requests'. The log does not show any test cases running, so there is no pass count to report. It establishes one narrower fact: the npm install completed, but the Python test environment in our fresh container did not have the module that the test imported.

That split is visible in the repository. package.json uses npm for release tooling and forwards npm test to Python, while requirements.txt separately lists requests and flake8. Our scan found 4 CI workflow files and a Dockerfile, but no tests directory; the test program sits at the repository root. The project documents pip3 install --user -r requirements.txt for its Python path, a step that matters even when npm itself reports a clean install.

Replacing a 76,510-entry hosts file needs system-level care

The documented Docker command mounts /etc/hosts and passes --replace, so it can modify a machine-wide networking file. The generator leaves the active file alone unless that flag is present, and it has a separate backup option. After replacement, the operating system or browser may retain earlier DNS answers, which is why the README gives cache-flush commands for Windows, Linux, and macOS. Automation should preserve the custom files and take a backup before a scheduled update.

Windows needs more judgment than the raw download suggests. The README says large hosts files can cause problems with the DNS Cache service, recommends compressed output, and warns that disabling the service can affect WSL. Open issue 3248 adds one user report from Windows 11 Pro 25H2: DNS Cache processing took long enough to interrupt internet access despite a compressed file. Treat that report as one fleet-specific warning and trial the chosen variant on the actual Windows machines.

Release 3.16.116 removed a reported false positive

Issue 3249 reported that the base smadex.com domain blocked a corporate site along with its client dashboard and contact pages. The request asked to keep named advertising and tracking subdomains blocked while restoring the root and web subdomains. The issue closed on September 20, 2026, and release 3.16.116 says the base domain was removed. The quick correction is encouraging. It also shows the unavoidable cost of domain-list blocking: somebody must notice and report an overbroad entry.

Most content disputes belong with the upstream source that contributed the domain, according to the project’s issue guidance. A local whitelist is therefore more than a convenience for managed machines. It is the immediate recovery path while a source maintainer reviews a report and the aggregated file catches up. Because matching is partial, test every exception against both the service you need and the subdomains you still intend to block.

Release 3.16.116 arrived with same-day source updates

GitHub recorded the last push on September 23, 2026, followed by release 3.16.116 that day. The release included source refreshes, domain additions and removal, and dependency updates. The repository had 31,103 stars and 154 open issues and pull requests when fetched; that combined GitHub number is not a bug count. Recent closed domain reports and merged pull requests show work happening alongside the automated list refreshes.

StevenBlack/hosts is easiest to recommend as a maintained artifact. Its npm package handles release work. Download the smallest suitable variant, keep an explicit whitelist, and know how to restore the previous system file. Build it yourself when the four extensions and local source controls solve a real policy need. If each device should not carry that maintenance burden, use the list through a network-level blocker such as Pi-hole instead.

Alternatives

ProjectWhat it isPick it when
HaGeZi DNS Blocklists gh↗A large menu of DNS blocklists with different protection levels and formats.pick this instead when you want to tune blocklist aggressiveness or feed a DNS blocker rather than replace a local hosts file.
Pi-holeA network DNS sinkhole that blocks domains for multiple clients from one service.pick this instead when centralized network blocking matters more than a file installed on each device.
AdAwayAn Android ad blocker that can use hosts files on rooted devices and local VPN mode otherwise.pick this instead when Android is the target and you want an app to manage blocking and exceptions.

What people are saying

  1. [velocity-scout] StevenBlack/hosts

Sources

  1. StevenBlack/hosts README
  2. Release 3.16.116
  3. Commit dcf08b8
  4. Issue 3249: corporate domain false positive
  5. Issue 3248: Windows DNS Cache report
  6. HaGeZi DNS Blocklists
  7. Pi-hole
  8. AdAway

More self-hosted reviews

LibreChat · Atomic-Chat · omakade · Mobile-Security-Framework-MobSF · radar · sftpgo · the whole board →