Ranger Try it free

How to block ads in every app on your Mac, not just the browser

In short: Safari content blockers and browser extensions only work inside that browser. Mail, news apps, games and the apps that came with your Mac load ads and trackers on their own. To cover all of them, block the ad networks' addresses for the whole Mac: with a filtering DNS service, the hosts file, or a firewall with blocklists. No method removes every ad.

Why your ad blocker stops at the browser

An ad blocker in Safari is a content blocker: an extension that Safari consults before loading the parts of a page. Chrome and Firefox extensions work the same way inside their own browsers. They are good at it, and they only see what happens in the browser they are installed in.

Every other app on your Mac makes its own connections. A free game loads banner ads from an ad network. A news app reports which articles you read to an analytics company. A weather app passes your location to a data broker. None of that goes through the browser, so the browser's blocker never sees it.

To reach those apps, you need to block at a lower level: the network addresses that ads and trackers come from, for every app at once.

Three ways to block ads across the whole Mac

1. A filtering DNS service

Every connection starts with a lookup: your Mac asks which server belongs to a name like ads.example.com. A filtering DNS service answers those lookups and simply gives no answer for known ad and tracking names.

Services such as NextDNS and AdGuard DNS work this way. You install a small configuration profile on your Mac, and from then on every app's lookups go through the service. NextDNS is free up to 300,000 lookups a month, after which it keeps working but stops filtering until the next month (NextDNS).

Good: easy to set up, covers every app, can cover your iPhone too. Less good: your lookups go to a third party, you can't easily allow something for one app only, and the free tier can run out on a busy Mac.

2. The hosts file

macOS has a file, /etc/hosts, that can send any name to nowhere. Add a line such as 0.0.0.0 ads.example.com and no app can reach that name. Our hosts file guide has the steps.

Good: free, built in, no third party. Less good: you edit a system file in Terminal with administrator rights, it doesn't understand wildcards, so every address goes on its own line, and nobody updates it for you. Ad networks change addresses often.

3. A firewall with blocklists

A firewall for outgoing connections sees every connection from every app and can compare it with lists of ad and tracking networks. Little Snitch offers curated blocklists. Ranger has ads and trackers as one of its three protections, on from the start.

Good: works on the Mac itself, lists update daily, and you can make exceptions per app. Less good: it costs money, and it protects the Mac it runs on, not your phone.

The ads nobody can block this way

Address-based blocking works when the ad comes from an ad network's address. Some ads don't: large sites serve them from the same address as the content itself. The ads in videos on large video sites are the best-known example. Block that address and you block the videos too.

So be wary of any tool that promises to remove every ad. An honest one removes a great deal of advertising and most tracking, and tells you what it can't do. Ranger's own website says exactly that.

When a site breaks

Aggressive lists occasionally block something a site needs, and a button or a video stops working. Ranger starts with a deliberately gentle ads list, chosen because it seldom breaks a site. If one misbehaves anyway, pause Ranger for ten minutes with one button, or switch the list off for that one app and leave it on everywhere else.

Ads are only part of what apps send. If you also want to stop usage reports to Apple and Microsoft, see how to stop your Mac sending usage reports. Ranger's trial lasts 14 days, with every feature and nothing to sign up for.