Hosts File Managers for Mac Compared
Your Mac's /etc/hosts file decides where a domain points before DNS is asked. Point an ad or tracker domain at 0.0.0.0 and every app on the Mac stops reaching it. Here's how the main ways to manage that file compare in 2026. Competitor facts come from each project's own page and were checked on 17 Oct 2026.
- ✓ Switching dev/staging hosts, free: SwitchHosts.
- ✓ Blocking ads, trackers or distractions system-wide, no Terminal: SaneHosts.
- ✓ Comfortable in Terminal, one list: download Steven Black's hosts file by hand (guide).
- ✓ Still on Gas Mask: it works under Rosetta 2, but its last release was February 2020.
Side by side
| SaneHosts | SwitchHosts | Gas Mask | Terminal + nano | |
|---|---|---|---|---|
| Price | $14.99 once (14-day trial, no card) | Free | Free | Free |
| Latest release | 1.1.26 | 5.0.2 (3 Sep 2026) | 0.8.6 (29 Feb 2020) | n/a |
| Apple silicon | Native (macOS 14+) | Apple silicon and universal builds | Intel-only binary, runs under Rosetta 2 | n/a |
| Built for | Blocking ads, trackers, adult, gambling, social | Switching hosts setups | Managing and switching hosts files | Anything, by hand |
| Curated blocklists | 200+, five one-click levels | Remote hosts by URL | Remote hosts by URL | You find them |
| DNS flush after changes | Automatic | Post-apply command option | — | Manual |
| Backups / undo | Automatic backups, roll back | Trash and restore entries | — | None |
| Source code | Public on GitHub (PolyForm Shield) | Open source (Apache-2.0) | Public on GitHub | n/a |
| Platforms | Mac | Mac, Windows, Linux | Mac | Any |
“—” means the project doesn't state it. Sources, checked 17 Oct 2026: SwitchHosts on GitHub and switchhosts.app; Gas Mask 0.8.6 release (architecture read from the downloaded app); StevenBlack/hosts. Something out of date? Email [email protected].
Which one fits you
A well-maintained, cross-platform hosts switcher with syntax highlighting, tray switching, remote hosts that refresh on a schedule, and import/export. It's the right pick for developers who flip between local, staging and production hosts. It doesn't ship curated ad-blocking levels.
The classic Mac hosts editor many of us started with. Version 0.8.6 is still downloadable, but it's an Intel build, so Apple silicon Macs run it through Rosetta 2. If it still does what you need, there's no urgent reason to switch. If you want native Apple silicon or built-in blocklists, look at the options above. Moving over is just copying your entries into a new profile.
Full control, nothing to install: sudo nano /etc/hosts, add lines, save, flush DNS. There's no undo and no profiles, and a typo can break name resolution. See how to edit the hosts file safely.
Built for blocking, not switching. Pick a protection level, from Essentials (~170K entries: ads, trackers, malware) up to Kitchen Sink (~700K), and click activate. You get 200+ curated lists from Steven Black, Hagezi, AdGuard and more, profiles for work, family or focus, macOS Touch ID or password approval before every change, automatic backups, and automatic DNS flush. Hosts data stays on your Mac. SaneHosts is listed in the StevenBlack/hosts README.
Start the 14-day trialmacOS 14 (Sonoma) or later. No credit card for the trial.
Questions people ask
What is a good Gas Mask alternative for Mac?
Gas Mask's last release (0.8.6) came out in February 2020, and its app binary is Intel-only, so it runs through Rosetta 2 on Apple silicon. Current options are SwitchHosts (free, open source, with Apple silicon builds) and SaneHosts ($14.99 once, native, with 200+ curated blocklists and five one-click protection levels).
Is there a free hosts file manager for Mac?
Yes. SwitchHosts is free and open source under Apache-2.0, and Gas Mask is free. You can also edit /etc/hosts in Terminal for free. SaneHosts is paid ($14.99 once) after a 14-day trial with no card.
Which hosts manager is best for blocking ads rather than switching dev environments?
SwitchHosts and Gas Mask are built around switching between hosts setups, which developers use for staging and local domains. SaneHosts is built around blocking: it ships 200+ curated blocklists (Steven Black, Hagezi, AdGuard and more) and five protection levels from about 170K to about 700K entries.
Does editing the hosts file block ads in every app on a Mac?
Yes for any domain listed. The hosts file is checked before DNS for every app, not just browsers. It can't block ads served from the same domain as the content, and it doesn't hide empty ad boxes the way a browser extension can.
Is changing /etc/hosts safe?
Editing it by hand can break name resolution if you make a mistake, and there's no undo. SaneHosts asks macOS for Touch ID or your password before each change, keeps backups you can roll back to, and flushes the DNS cache for you.