How to Stop an App From Connecting to the Internet on a Mac
There is no setting in macOS for this. The firewall in System Settings blocks connections coming in to your Mac and has no control over what your apps send out, so the answer always involves either a firewall app or an awkward workaround. Below are the four methods that actually work, in the order most people should try them.
Method 1: block the app with a firewall app
The direct answer. A firewall app sits in the path of every connection using an official macOS service, so it can stop a named app from reaching anything at all.
In MiniFirewall that is: open the Blocks tab, press the plus button, choose App, pick the app, and choose whether to block connections it starts, connections to it, or both. The app keeps running, it simply stops being able to reach the network.
One detail worth knowing: a good firewall app can block an app that has never run yet. It identifies the app rather than the running program, so something you install tomorrow is blocked the first time it tries, not the first time you notice it.
When to use it: you want the app silent, full stop, and you do not mind that its online features stop working.
Method 2: block one website instead of the whole app
Usually the better idea, and the one most people do not realise is available.
Blocking a whole app is blunt. If a media player contacts an advertising network and your music library, blocking the app costs you both. Blocking just the advertising network costs you only the thing you objected to.
You can block a website for every app on the Mac, which macOS enforces itself and never misses, or for one app only. The first is more reliable and is the right default. The second is narrower and inherently less certain, because the firewall has to work out which website each connection belongs to and some apps make that difficult.
When to use it: the app is useful and one specific destination is not.
Method 3: turn off the app’s own setting first
Worth thirty seconds before reaching for a tool. A surprising number of apps have a preference for exactly this, usually called something like “check for updates automatically”, “send usage data”, or “share analytics”.
Look in the app’s own Settings, then in System Settings, Privacy & Security, Analytics & Improvements, which controls what macOS itself sends to Apple.
When to use it: always try this first. If the app offers the switch, using it is cleaner than blocking around it.
Method 4: the hosts file, with reservations
macOS has a file at /etc/hosts that maps names to addresses. Point a name at 127.0.0.1 and requests for it go nowhere.
It works, and it is free. The reservations are real:
- It blocks the name for every app, with no way to make an exception.
- It cannot block by app, only by name.
- Anything using an address directly, or its own private way of looking up names, walks straight past it. That includes several modern browsers by default.
- Editing it requires the Terminal and administrator rights, and a mistake here breaks name lookups in ways that are hard to diagnose later.
When to use it: you already know your way around a Terminal, you want one name gone everywhere, and you will remember in six months that you did this.
Which method for which situation?
| Situation | Best method |
|---|---|
| App has a setting for it | Use the app’s own setting |
| App should be entirely offline | Block the app |
| App is useful, one destination is not | Block that website |
| You want it gone for every app on the Mac | Block the website for every app |
| You want to keep it working on one Mac only, temporarily | Block, then pause the block later |
What about just deleting the app?
Reasonable, and sometimes correct. But the two cases where blocking wins are worth naming: when you need the app but not its phoning home, and when the program is part of macOS and cannot be deleted safely.
That second case deserves care. Some connections that look suspicious are macOS doing its job, and blocking them has consequences: software updates stopping, or time synchronisation drifting. A firewall app worth using will warn you before you block something the system depends on, and tell you what specifically will stop working. MiniFirewall shows that warning with Cancel as the default button, so the accidental press does the safe thing.
Will blocking break anything?
Sometimes, and the honest answer is that you may not find out immediately. An app that cannot reach its server might fail loudly, or might quietly stop syncing while looking fine.
Two habits make this manageable. Block one thing at a time, so when something misbehaves you know which change caused it. And use a tool where a block can be paused rather than deleted, so undoing it is one click and you keep the record of what you tried.
Sources
- Apple, Block connections to your Mac with a firewall, on the built-in firewall covering incoming connections only
- Apple, Share analytics with Apple, on the system-level analytics setting