You sit down to work for half an hour. You open one tab for research, another for email, and then muscle memory takes over. A social feed, a news site, a shopping tab, maybe a video you didn't plan to watch. Suddenly the task you meant to finish is still open, untouched, and your Mac has become a very efficient distraction machine.
This is often when individuals look for a way to block websites on Mac. Not because they want to turn their computer into a locked box, but because they want a little help protecting their attention. The right setup depends on your specific objective. Temporary focus needs one kind of blocker. Parental control needs another. Serious self-control, especially if you know you'll try to get around your own rules, needs something stronger.
Table of Contents
- Why You Need to Block Websites on Your Mac
- Method 1 Using Screen Time for Simple Blocking
- Method 2 Editing the Hosts File for System-Wide Control
- Method 3 Using Browser Extensions for Flexible Blocking
- Choosing Your Method and When to Use a Dedicated App
- Troubleshooting and Advanced Tips
Why You Need to Block Websites on Your Mac
People don't need more motivation. They need less friction between intention and action.
A student starts writing a paper and keeps bouncing back to Reddit. A remote worker checks one Slack message, then drifts into email, then a sports site, then back to the document with a broken train of thought. A parent hands over a shared Mac for homework and realizes the browser is one click away from everything except homework. Different scenario, same problem. Open access creates too many easy exits.
Website blocking helps because it changes the default. Instead of asking yourself to make the right choice over and over, you make one decision upfront. Then the Mac enforces it for you, at least to the degree your chosen method allows.
Blocking is different depending on your goal
Some people want a gentle nudge. Others need a hard barrier.
- For self-control: You want to stop yourself from opening the same distracting sites during work or study.
- For parental control: You want a passcode-protected setup that another user on the Mac can't casually undo.
- For temporary focus: You want flexible rules, maybe only during classes, deep work sessions, or a writing sprint.
- For shared computers: You want predictable behavior across accounts and browsers.
Blocking a site isn't really about the site. It's about reducing the number of decisions your brain has to fight through when you're trying to focus.
The mistake I see most often is choosing the easiest method without asking what kind of enforcement you need. Some tools are convenient but easy to bypass. Others are stronger but less flexible. If you want to block websites on Mac in a way that sticks, you need to match the method to the behavior you're trying to change.
Method 1 Using Screen Time for Simple Blocking
Screen Time is the right starting point if you want website blocking that is built into macOS, quick to set up, and easy to manage later. I usually recommend it first for two situations: personal focus on a Mac you already use every day, and family rules where you want a passcode before anyone can change the settings.
Apple gives you three web access modes inside Screen Time, including Unrestricted Access, Limit Adult Websites, and Allowed Websites Only, as shown in MacMost's guide. Those options matter because they map to three different goals. A light blocklist works for self-control. A filtered mode helps with general content restrictions. A strict allowlist is better when you want the Mac to permit only school, work, or a short approved list.

When Screen Time makes sense
Screen Time works best when convenience matters as much as enforcement.
Use it if you want to:
- Block a short list of distracting sites: Good for cutting off common attention traps during work.
- Filter broad web content: Useful if the goal is general content restriction rather than a custom list.
- Create a tight allowlist: Best for younger kids, homework setups, test prep, or a shared Mac with a narrow purpose.
- Protect settings with a passcode: Important if another user should not be able to remove the restrictions casually.
The trade-off is simple. Screen Time is easy to live with, but it is not the strongest lock you can put on a Mac. If your main problem is impulsive clicking, that is often enough. If your main problem is bypass resistance, you may outgrow it.
How to add blocked websites
The setup is straightforward:
- Open System Settings.
- Select Screen Time.
- Turn on Content & Privacy Restrictions.
- Open the web content settings.
- Pick the mode that matches your goal.
Here is how those modes differ in practice:
- Unrestricted Access leaves the web fully open.
- Limit Adult Websites turns on Apple's filtering and also lets you add specific sites you want blocked.
- Allowed Websites Only creates an allowlist, so anything not approved is off limits.
If you want to block a specific site, use the Never Allow list. Add the exact site address you want restricted. It helps to add common variations if the site uses more than one version, such as the main domain and the www version.
Practical rule: If you are setting this up for focus, block only the sites that actually break your workflow. If you are setting it up for a child or a shared study device, an allowlist with a passcode is usually the better choice.
A quick visual walkthrough helps if you prefer to follow along on screen:
What Screen Time does well and where it falls short
Its biggest strength is low setup friction. You can turn it on in a few minutes, make changes without touching Terminal, and manage it from the same settings area as the rest of your Mac controls. For many people, that simplicity means they will use it instead of postponing the setup.
It is also more flexible than it looks at first glance. You can use a light-touch blocklist for your own focus sessions, or switch to an allowlist when the goal is tighter control. That makes it a practical middle ground for users who want more structure without getting into system files or third-party tools.
The weakness is enforcement. Screen Time is a settings-level control inside macOS. It is not the same as system-wide domain blocking. That distinction matters if you use several browsers, different apps with built-in web views, or a shared machine where someone may actively try to work around the rules.
That is why I would rate Screen Time like this:
| Goal | Fit with Screen Time |
|---|---|
| Personal focus with a few blocked sites | Strong |
| Family restrictions with a passcode | Good |
| Temporary blocking with minimal setup | Strong |
| Blocking across every browser and network path | Limited |
| Hard-to-bypass lockdown | Weak to moderate |
If your goal is self-control or light parental control, Screen Time is often enough. If you need broader coverage or a setup that is harder to bypass, use one of the stronger methods below.
Method 2 Editing the Hosts File for System-Wide Control
If Screen Time feels too soft, the hosts file is the classic Mac power-user method.
This is the option I point people to when they say, “I don't want this blocked in one browser. I want it blocked on this Mac.” It's more technical, but it's also much closer to true machine-level control.

What the hosts file actually does
The hosts file is a local system file your Mac checks when resolving domain names. When you map a website's domain to a local address instead of its real destination, the browser can't load the actual site.
That's why this method has a bigger enforcement footprint than a browser extension. It operates below the browser layer, so browsers that honor system DNS resolution hit the same local rule.
How to block domains the reliable way
An effective way to block websites on macOS is to edit /etc/hosts with administrator privileges, map unwanted domains to 127.0.0.1, then flush the DNS cache so changes take effect immediately, as shown in this Mac hosts file walkthrough on YouTube.
The practical workflow looks like this:
- Open Terminal.
- Use sudo to edit
/etc/hosts. - Add one line for each domain you want blocked.
- Save the file.
- Flush the DNS cache so your Mac stops using the old lookup result.
Two details matter a lot here:
- Block both hostname variants: If you only add
example.comand notwww.example.com, the version you skipped may still load. - Flush the cache after saving: If you skip that step, the block may look broken because the Mac is still using a cached result.
A hosts-file block is stronger than a browser add-on because it doesn't care whether the user opens Safari, Chrome, or Firefox. The rule lives on the machine.
This method is a good match if you're comfortable with admin-level changes and want a more durable setup than Screen Time usually provides.
Best use cases and common mistakes
The hosts file is best when your priority is coverage.
Use it for these situations:
- You use multiple browsers: The rule affects more than one browser environment.
- You share the Mac across accounts: Machine-level blocking helps create consistent behavior.
- You want fewer moving parts: No extensions to install, manage, or accidentally disable.
- You need a plain domain block: It's great for simple deny lists.
The trade-off is flexibility. Editing a system file isn't hard once you've done it, but it's not friendly for quick schedules, timed focus sessions, or day-by-day experimentation. It's also manual. If your blocklist changes often, you may find yourself back in Terminal more than you want.
The most common mistakes are simple:
- Only blocking one domain variant
- Forgetting to flush DNS
- Expecting page-level granularity instead of domain-level control
- Changing the file without admin access
If your goal is serious self-control on one Mac, this is often the strongest free method. If your goal is easy scheduling and habit support, it can feel too rigid.
Method 3 Using Browser Extensions for Flexible Blocking
You sit down to work, open Chrome for one task, and twenty minutes later you are reading news, checking Reddit, or watching videos you never meant to start. That is the kind of problem browser extensions solve well. They are built for focus support, quick setup, and flexible rules, not machine-level lockdown.
Install one in Chrome, Firefox, or Edge, add the sites that keep pulling you off task, and set the schedule you want. For temporary focus, that is often enough.

Why extensions work well for temporary focus
Extensions are popular because they match real working habits better than system-level methods do.
A student can block YouTube during study hours and leave it open at night. A freelancer can shut off social feeds until noon. A writer can run a timed session that blocks distractions for one sprint, then lifts the block during a break. You can usually do all of that from a clean interface without opening System Settings or Terminal.
Common features include:
- Scheduled blocks: Good for work hours, class time, or recurring routines.
- Allowlists: Useful when you need a few research sites but want everything else off-limits.
- Custom block pages: Helpful if a short reminder keeps you from clicking through.
- Timers and session modes: A better fit for Pomodoro-style focus than permanent restrictions.
This method makes the most sense when your goal is behavior support. It gives you flexibility and low setup friction.
The trade-off with extensions is enforcement boundaries
Extensions only control the browser where they are installed. A blocker in Chrome does not automatically affect Safari or Firefox. If you use more than one browser, or you know you will switch the moment a block appears, this method loses strength fast.
That is why extensions are usually best for:
- Self-control in one main browser
- Temporary focus sessions
- Schedules that change during the week
- Testing a new routine before using a stricter method
They are a weaker fit for:
- Parental control
- Multi-browser households
- Shared Macs that need consistent rules
- Situations where disabling the blocker is likely
Reality check: If you can turn it off in a few clicks, it is a focus aid, not a serious lock.
That limitation is not a flaw if your goal is modest. For many people, a soft barrier is enough to interrupt autopilot and create one extra moment to choose differently. If you need stronger enforcement, browser extensions are usually too easy to bypass.
Choosing Your Method and When to Use a Dedicated App
Most guides stop after listing methods. The better question is simpler: what are you trying to prevent, and how hard do you need it to be to reverse?
A useful way to think about this is coverage. Some methods are Safari-centric. Some are machine-wide. Some follow only one browser profile. And some don't help at all once you reach for another device. That gap matters more than most tutorials admit, as noted in Setapp's discussion of blocking across browsers, profiles, and devices.

Website Blocking Method Comparison
| Method | Ease of Use | Effectiveness | Flexibility |
|---|---|---|---|
| Screen Time | Easy | Moderate for simple use | Moderate |
| Hosts file | Technical | High on one Mac | Low |
| Browser extensions | Easy | Low to moderate | High |
| Dedicated apps | Easy to moderate | Moderate to high | High |
Pick based on your goal, not the feature list
If you're trying to block websites on Mac for self-control, the main issue is bypass risk.
A simple way to choose:
- You want the easiest built-in option: Use Screen Time.
- You want machine-wide blocking on one Mac: Use the hosts file.
- You want schedules, timers, and low-friction setup: Use a browser extension.
- You want a stronger focus system, often across more than one device: Look at dedicated apps.
Different goals call for different enforcement levels.
For temporary focus
Use an extension or a dedicated focus tool. These are better when your rules need to change throughout the day.
For parental control
Use Screen Time with a passcode if you want a native setup. If you need broader coverage and more extensive behavior, a dedicated app is often easier to manage long-term.
For hard self-control on one Mac
The hosts file is the strongest free DIY option in this article because it isn't tied to one browser.
When a dedicated app makes more sense
DIY methods all have gaps.
Screen Time is convenient, but limited in scope. The hosts file is strong, but manual. Extensions are flexible, but easy to disable. None of those is ideal if you want one tool that supports focus as an ongoing habit instead of a one-off blocklist.
That's where dedicated focus apps earn their place. The good ones don't just block websites. They help you start a work session quickly, keep your rules consistent, and make focused time easier to repeat. The best setups usually include:
- Cross-browser or system-wide behavior
- Session-based blocking
- A clear way to separate work time from free time
- Task support so blocking is tied to something you're trying to finish
- Enough friction to stop impulsive switching without making the tool miserable to use
A blocker should fit your workflow, not just your worst habits. If your current setup only works when you're already disciplined, it probably won't hold up when you're tired, stressed, or avoiding a hard task.
Troubleshooting and Advanced Tips
A blocked site still loads
Check the method you used.
If you edited the hosts file, the usual causes are missing a hostname variant or forgetting to flush the DNS cache after saving the file. If you used Screen Time or an extension, test in the exact browser or app where you expect the block to apply.
You need blocking on a schedule
Use a browser extension or a dedicated app. Screen Time and the hosts file are better for basic restriction than for flexible recurring focus windows.
You need the block to work in every browser
Use the hosts file on that Mac. Browser extensions won't follow you across browsers, and Screen Time may not behave the same way in every app.
You're setting this up for a child or shared laptop
Use Screen Time with a passcode if you want a native Apple workflow. If the household uses different browsers or needs stronger consistency, consider a dedicated app instead of relying on browser-specific tools.
You also want coverage on your phone
A Mac-only method won't help once you pick up another device. In that case, use a tool designed for cross-device focus rather than treating the Mac in isolation.
If you want more than a basic blocklist, Kohru is worth a look. It combines one-click Focus Sessions with distraction blocking across your devices, plus Smart To-Do Lists and habit support that make it easier to turn intention into actual work. That's a better fit when your goal isn't just to block websites on Mac, but to build a repeatable focus routine you can stick with.
