How to Block Websites on Mac (2026)
Whether you want to protect your kids from harmful content, block distractions during work, or strengthen your network security, macOS gives you several ways to restrict website access. Some are built right in, others require a quick trip to Terminal.
This guide covers five proven methods, from the simplest click-and-block approach to more advanced techniques that work across every browser on your Mac.
In short — The most reliable way to block websites on a Mac is to combine a system-level method with Screen Time, since Screen Time alone only reliably covers Safari.
- Screen Time — free, built-in, but mainly blocks Safari, not Chrome or Firefox.
- Hosts file — free, blocks every browser and app, but requires Terminal and per-site entries.
- DNS filtering (OpenDNS, NextDNS, CleanBrowsing) — blocks by category across every device on the network.
- Router-level blocking — covers every device on your Wi-Fi, no software to install.
- Third-party apps (also called internet blockers) — Browwwser, SelfControl, Cold Turkey, Freedom — add scheduling, lock modes, and app blocking on top of website blocking.
Quick Comparison: Which Method Should You Choose?
| Method | Difficulty | All Browsers | Bypass Risk | Best For |
|---|---|---|---|---|
| Screen Time | Easy | Safari only | Medium | Parents |
| Hosts File | Moderate | Yes | Low | Tech users |
| DNS Filtering | Moderate | Yes | Very Low | Businesses |
| Router Settings | Moderate | Yes | Low | Households |
| Third-Party Apps (Internet Blockers) | Easy | Yes | Medium | Productivity |
Method 1: Use Screen Time (Easiest)
Screen Time is the fastest way to block websites on a Mac. It comes pre-installed on macOS Catalina (10.15) and later, so there’s nothing to download. The catch? It mainly affects Safari and may not block sites in Chrome or Firefox.
How to Set It Up
Step 1: Open System Settings — Click the Apple menu in the top-left corner, then select System Settings.
Step 2: Go to Screen Time — Click Screen Time in the sidebar. Make sure it’s turned on.
Step 3: Open Content & Privacy — Click Content & Privacy, then toggle on Content & Privacy Restrictions.
Step 4: Restrict Web Content — Under Web Content, choose Limit Adult Websites. Then click Customize.
Step 5: Add Sites to Block — In the Restricted section, click the + button and type the URL you want to block (e.g., facebook.com). Click Done.
Pro Tip: For a stricter approach, choose Allowed Websites Only instead. This blocks everything except the sites you manually approve — ideal for a child’s Mac.
Limitations of Screen Time
Screen Time is easy to set up, but it has real drawbacks. It primarily filters Safari, so tech-savvy users can bypass it by switching to another browser. There’s no central management for multiple devices, and the adult content filter is a broad category — you can’t fine-tune it to block gaming or social media specifically.
Method 2: Edit the Hosts File (Works in Every Browser)
Your Mac has a hidden file called the hosts file. Think of it as a phone book for the internet: when you type a website address, your Mac checks this file first. By adding a fake entry that points a website to nowhere, your Mac won’t be able to load it — in any browser, in any app, no exceptions.
This method is more technical than Screen Time, but it’s also far more effective. You’ll need to open Terminal, the built-in command-line tool on every Mac. Don’t worry — you only need to copy and paste a few lines.
Step-by-Step Instructions
Step 1: Open Terminal. Press Command + Space to open Spotlight, type Terminal, and hit Enter. A window with a blinking cursor will appear — that’s where you’ll paste the commands below.
Step 2: Create a safety backup. Before changing anything, save a copy of the original file. Copy and paste this line into Terminal, then press Enter:
sudo /bin/cp /etc/hosts /etc/hosts-original
Your Mac will ask for your password. Type it (nothing will appear on screen — that’s normal) and press Enter.
Step 3: Open the hosts file for editing. Copy and paste this line and press Enter:
sudo nano /etc/hosts
A simple text editor will open inside Terminal.
Step 4: Add the websites you want to block. Use the arrow keys to move your cursor to the very bottom of the file. Then, on a new line, type the following (replace facebook.com with whatever site you want to block):
127.0.0.1 facebook.com
127.0.0.1 www.facebook.com
You can add as many sites as you want, one per line. The number 127.0.0.1 tells your Mac to redirect the website to itself — which means the page simply won’t load.
Step 5: Save and close. Press Control + O (the letter O, not zero), then Enter to save. Then press Control + X to exit the editor.
Step 6: Apply the changes. Paste this final command and press Enter:
sudo dscacheutil -flushcache
This clears your Mac’s memory so the new rules take effect immediately. Open any browser and try visiting the site — it should fail to load.
If something goes wrong, you can restore the original file at any time. Open Terminal and run:
sudo /bin/cp /etc/hosts-original /etc/hosts— this will undo all your changes and bring everything back to normal.
Why This Method Is Worth the Effort
Unlike Screen Time, the hosts file blocks websites in every browser and every app on your Mac. There’s no extension to disable, no toggle to flip. It’s built into macOS itself, and a standard user without admin access can’t undo it. The tradeoff: you need to add sites one by one (no category-based blocking), and you have to be comfortable copying commands into Terminal.
Method 3: Set Up DNS Filtering
Every time you visit a website, your Mac asks a DNS server (like a phone book for the internet) to translate the address into a number your computer can understand. By switching to a DNS server that refuses to translate certain websites, those sites simply stop working — on every browser, every app, without installing anything. This approach is sometimes called a web filter, since it filters traffic before it ever reaches your browser.
Services like OpenDNS, CleanBrowsing, or NextDNS let you block entire categories of websites (adult content, gambling, social media) from a simple online dashboard.
How to Configure It on Mac
Step 1: Open System Settings. Click the Apple menu > System Settings > Network. Click on your active connection (usually Wi-Fi), then click Details, then go to the DNS tab.
Step 2: Replace the DNS servers. Click the - button to remove existing entries. Then click + and add the IP addresses from your chosen provider. For example, to use OpenDNS Family Shield (blocks adult content automatically), add these two addresses:
208.67.222.123208.67.220.123
Click OK, then Apply.
Step 3: Test it. Open any browser and visit a site that should be blocked. If the setup worked, you’ll see a block page instead of the website.
Why DNS Filtering Stands Out
DNS filtering is the most scalable option. You can block entire categories of sites without listing individual URLs. It works across all browsers and apps, and many providers offer online dashboards to monitor traffic and adjust rules in real time. For families, businesses, or anyone managing multiple devices, this is the most effective long-term solution.
Method 4: Block Websites at the Router Level
If you want to block websites for every device on your network — including phones, tablets, and guest devices — you can do it from your router’s settings page. No software to install on any device.
How to Do It
Step 1: Find your router’s address. Go to System Settings > Network > Wi-Fi > Details > TCP/IP. Look for the number next to Router — it’s usually something like 192.168.1.1.
Step 2: Open your router’s admin page. Type that number into your browser’s address bar (e.g., http://192.168.1.1) and press Enter. Log in with your router’s admin username and password. If you’ve never changed these, check the sticker on the bottom of your router or your ISP’s documentation.
Step 3: Find the website blocking feature. Every router brand uses a different name for it. Look for a section called Access Control, URL Filter, Parental Controls, or Website Blocking. Check under the “Security” or “Advanced” menus if you don’t see it right away.
Step 4: Add the sites you want to block. Enter the domain names (e.g., facebook.com, tiktok.com) and save the settings. The block will apply to every device connected to your Wi-Fi.
Pro Tip: Not all routers support website blocking. If yours doesn’t, you can still get network-wide protection by changing your router’s DNS settings to a filtering service like OpenDNS (see Method 3).
Method 5: Use a Third-Party Internet Blocker App
If you prefer a visual interface with scheduling, app-level control, and focus sessions, a third-party internet blocker fills the gap. Here are some popular options for Mac:
| App | Platform | Price | Bypass Risk | |
|---|---|---|---|---|
![]() | Browwwser | macOS | $99/yr or $199 lifetime (7-day trial) | Very low |
![]() | SelfControl | macOS | Free | Low |
![]() | Cold Turkey | Windows, macOS | Free / $39 one-time (Pro) | Medium |
![]() | Freedom | macOS, Windows, iOS, Android, Chrome | Free (limited) / $40/yr or $99.50 lifetime | Medium |
![]() | Focus | macOS | From $49 one-time, or via Setapp | Medium |
![]() | 1Focus | macOS | Free / $1.99/mo or $9.99/yr (Pro) | Medium |
Mac-Focused Apps
Browwwser — A macOS browser with site and app blocking built directly into the browser engine. No extensions, no workarounds — blocked sites simply don’t load. Includes lock mode, scheduling, and can even close distracting desktop apps. The blocking runs at the OS level, making it extremely hard to bypass. Browwwser is currently in private beta, so signing up gets you on the waitlist for the official launch rather than instant access.
SelfControl — A free, open-source app that blocks websites for a pre-set period. Once the timer starts, you can’t undo it, even by restarting your Mac. Ideal for productivity and self-discipline. We cover it in more detail in our SelfControl review.
Focus — Lets you create focus sessions that block specific websites and apps. Integrates with the Pomodoro technique for timed work sprints. Sold as a one-time purchase starting at $49, and also available through Setapp.
1Focus — Lightweight Mac app that blocks websites across Safari, Chrome, Brave, Edge, Opera, and Arc. Supports scheduling and category-based blocking, with a free tier and an optional Pro subscription.
Cross-Platform Apps
Cold Turkey — Blocks websites and apps on a schedule, on Windows and macOS. The free version covers websites only; the $39 one-time Pro version adds app blocking, scheduling, and locking, and can’t be easily bypassed.
Freedom — Cross-platform blocking that syncs across Mac, Windows, iOS, and Android, so a session started on your Mac also blocks your phone. Locked Mode prevents early exits. See our Browwwser vs. Freedom comparison if you’re weighing the two.
Browser Extensions: A Lighter-Weight Option
If you only need to control browsing inside one browser, a lightweight extension can work — though by nature it’s easier to disable than the system-level apps above.
LeechBlock NG — A free, open-source extension for Firefox, Chrome, and Edge that limits time on chosen sites or blocks them on a schedule. It’s still actively maintained, with an update as recent as August 2026. Solid free choice if a browser-only block is enough for your needs.
StayFocusd — A long-running Chrome extension for limiting time on distracting sites. One caution: independent security researchers separately flagged, in December 2025 and again in May 2026, code in StayFocusd capable of exfiltrating browsing data. Until that’s resolved, we’d point you to LeechBlock or a system-level blocker instead.
Frequently Asked Questions
Does Screen Time block websites in Chrome?
Not reliably. Screen Time’s web content restrictions are designed primarily for Safari. For Chrome, Firefox, or other browsers, use the hosts file method or a third-party app that works system-wide.
Can someone bypass the hosts file block?
Only if they have admin access. A standard user can’t edit the hosts file. For extra security, combine hosts file blocking with a DNS filter so that even if one method is bypassed, the other still blocks access.
What is the most effective way to block websites on Mac?
DNS filtering combined with the hosts file gives you the strongest protection. DNS filtering handles category-based blocking at the network level, while the hosts file catches specific domains system-wide. Together, they’re very hard to circumvent.
How do I unblock a website I previously blocked?
The process depends on the method you used. For Screen Time, go back to Content & Privacy and remove the site from the Restricted list. For the hosts file, open Terminal, edit the file with sudo nano /etc/hosts, delete the relevant line, save, and flush the DNS cache.
What’s the best free way to block websites on a Mac?
The hosts file is free and works in every browser and app, though you’ll need Terminal to set it up. SelfControl is the best free app-based option — it’s open-source and uses an irreversible timer, so you can’t undo a block once it starts.
Is there an internet blocker for Mac that doesn’t rely on browser extensions?
Yes. Extensions can be disabled in two clicks, so anything system-level is stronger. The hosts file, a DNS filter, and apps like SelfControl, Cold Turkey, or Browwwser all block at the OS or engine level instead of inside a specific browser.
What’s the best internet blocker for Mac?
It depends on how strict you need the block to be. For a no-setup option, Screen Time works but only reliably covers Safari. For a stronger, system-wide block, see the apps compared in Method 5 — Browwwser blocks at the browser engine level, SelfControl uses an irreversible timer, and Cold Turkey adds app blocking alongside website blocking.
Is there a web filter for Mac?
Yes — DNS filtering services like OpenDNS, CleanBrowsing, and NextDNS act as a web filter for your Mac, blocking entire categories of sites (adult content, gambling, social media) at the network level. See Method 3 for setup instructions. Unlike Screen Time, a DNS filter works across every browser and app on your Mac.
Final Thoughts
There’s no single best way to block websites on a Mac — it depends on who you’re protecting and how determined they are to get around it. Screen Time works for quick parental controls on Safari. The hosts file and DNS filtering offer system-wide, hard-to-bypass solutions. Router-level blocking covers your entire network. And third-party apps add scheduling and focus features.
For maximum security, layer two or three methods together. A DNS filter handles broad categories, the hosts file catches specific URLs, and Screen Time adds an extra barrier for Safari users. That combination covers nearly every scenario.
We built the #1 browser
for |
A macOS browser that blocks distracting sites and apps at the OS level.
Try it free for 7 daysTired of blockers you can dodge by switching browsers? Browwwser blocks at the browser engine level — nothing to disable.
Try it free for 7 days