AppBlock Blog Productivity How to Block a Website on Safari on iPhone, iPad, and Mac

You already know how this goes. You open Safari to check one thing, your thumb lands on a bookmark you didn’t consciously choose, and twenty minutes later you’re on surfing on socials and sites you promised you wouldn’t go on. Blocking those time-wasting webpages keeps you accountable.

Below are five ways to do it in Safari, ordered by how most people should actually approach it the built-in route first, the un-bypassable route after, and the network-wide route for anyone covering a whole household.

Why Safari has no block button – and what to use instead

Safari is not a content manager. Apple deliberately keeps site blocking out of Safari’s own settings and puts it in Screen Time, the system-level tool that governs content across the whole device. That single design decision explains most of the confusion around this topic.

It means the block you set is a device block, not a browser block. On iPhone and iPad, a Screen Time block applies to Safari and to most other browsers on the device. On Mac, it applies to the user account you set it on.

One clarification worth making, because the naming invites it: Safari’s Hide Distractions feature, added in iOS 18 and macOS Sequoia, is not a blocker. It removes individual elements from a page you’re already looking at. It does not stop the page from loading.

1. Block a website on Safari on iPhone or iPad (Screen Time)

This is the built-in method and the right starting point for most people.

  1. Open Settings and tap Screen Time.
  2. Tap Content & Privacy Restrictions and turn the toggle on.
  3. Tap App Store, Media, Web, & Games, then tap Web Content. (On iOS 17 and earlier this menu is called Content Restrictions.)
  4. Select Web Content.
  5. Under Never Allow, tap Add Website and enter the full URL of the site you want blocked.
  6. Repeat for each site. Blocked pages now show a restriction notice in Safari instead of loading.

By default, the restriction screen shows an “Allow Website” link that unblocks the site in one tap which makes the whole exercise decorative. Go back to Settings → Screen Time → Lock Screen Time Settings and set a passcode. With a passcode in place, that link demands the code before it will let anything through.

Two things this method won’t do: it can’t block by keyword, only by URL, and mobile subdomains sometimes need adding separately. If you want the fuller picture of the platform’s limits, we’ve written up What AppBlock Can and Can’t Block on iPhone, most of which is really a list of what iOS allows.

2. Block a website on Safari on Mac (Screen Time)

Screen Time on macOS works the same way, but the block applies per user account, so it’s well suited to a shared family Mac.

  1. Open System Settings and click Screen Time in the sidebar.
  2. If you’re a parent or guardian in a Family Sharing group, choose the family member from the pop-up menu.
  3. Click Content & Privacy, then App Store, Media, Web, & Games.
  4. Set Web Content to Limit Adult Websites, then click Customize.
  5. Under Restricted, click the add button, enter the site’s URL, and click Done.

As on iPhone, set a Screen Time passcode afterwards, or anyone with the Mac open can undo the whole thing in fifteen seconds.

3. Use a blocker app with a locked mode (when you’re blocking yourself)

Screen Time is built as a simple Apple feature to track hours spent on your device. It cannot effectively restrict you as you hold the passcode to break it. That’s where you need a 3rd party application to help keep yourself accountable.

AppBlock on iPhone and iPad uses Apple’s Screen Time framework to block domains in Safari, Chrome, Edge, Firefox and Brave. Its Strict Mode is the part that matters here: while a session is running, you cannot switch the block off, and you cannot delete AppBlock to get around it. Schedules let you set the block by time, day, and even location, so the restriction is already in place before the moment of weakness arrives.

4. Edit the hosts file (Mac only, no apps needed)

The hosts file is a plain-text file your Mac checks before it queries the internet. Point a domain at your own machine and the browser has nowhere to go in Safari, Chrome, Firefox, and everything else on that Mac.

  1. Open Terminal.
  2. Type sudo nano /etc/hosts and press Return, then enter your admin password.
  3. On a new line at the bottom, add 127.0.0.1 example.com, then a second line for 127.0.0.1 www.example.com.
  4. Press Control-O to save, Control-X to exit.
  5. Flush the cache with sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder.

This method is free, browser-agnostic, and survives a Safari reinstall. It also takes exactly as long to undo as it did to set up, but it does nothing for iPhone or iPad, where there’s no accessible hosts file.

5. Block at the router or DNS (whole household, every device)

Router-level and DNS-level blocking stops a domain before it reaches any device on your network. Configure a filtering DNS service in your router’s admin panel, or add the site to your router’s blocklist directly, and Safari on every iPhone, iPad and Mac in the house stops loading it.

The trade-off is coverage in both directions: it protects the whole network, and it stops protecting the moment a phone leaves the Wi-Fi and switches to cellular data.

Which Safari blocking method should you use?

MethodDevicesDifficultySurvives determined effort
Screen TimeiPhone, iPad, MacEasyNo, can easily bypass
AppBlockiPhone, iPad, MacEasyYes
Hosts fileMac onlyMediumNo, admin can edit it back
Router / DNSEvery device on the networkHardYes, but only on that network

Why these native blocks fail

A block fails for one of three reasons: no passcode, so it can be tapped away; only the desktop URL was added, so the mobile subdomain still loads; or the site opens inside another app’s built-in browser, which Screen Time’s Safari-level filtering doesn’t reach.

Blocking Safari sites with AppBlock

AppBlock is an app and website blocker for iOS, Android and desktop browsers, built for the case where the person you’re restricting is yourself. On iPhone and iPad it blocks websites in Safari, runs on schedules you set once, and uses Strict Mode to make quitting harder than continuing, including preventing you from deleting the app mid-session.

If you’re setting this up across more than Safari, AppBlock for iOS covers apps and browsers together.

FAQ

How do I block a website on Safari on my iPhone?

Go to Settings → Screen Time → Content & Privacy Restrictions → App Store, Media, Web, & Games → Web Content. Choose Limit Adult Websites, then tap Add Website under Never Allow and enter the URL. Set a Screen Time passcode afterwards, or the block can be lifted from the restriction screen in one tap.

Can I block a website on Safari without Screen Time?

On a Mac, yes. Editing the hosts file at /etc/hosts blocks a domain in Safari and every other browser on that machine, and blocking at your router or DNS covers every device on the network. On iPhone and iPad there is no hosts file, so the alternatives are a blocker app or network-level filtering.

Does blocking a website in Safari also block it in Chrome on my iPhone?

Usually yes. Screen Time’s web content restrictions work at the system level, so they apply to Safari and most other browsers on the device. The gap is browsers built into other apps, tapping a link inside a social app often opens an in-app browser that the restriction doesn’t reach.

How do I block a website on Safari permanently so I can’t unblock it?

Nothing on iOS is permanent, but you can make undoing it deliberately difficult. Set a Screen Time passcode you don’t memorise, or use a blocker with a locked mode. AppBlock’s Strict Mode keeps the block active for the length of the session and prevents the app from being deleted to escape it.

Can Safari block websites by keyword instead of URL?

No. Screen Time’s Never Allow list accepts specific URLs only, so each site has to be added individually, and mobile subdomains sometimes need adding separately.

Why is a website still loading after I blocked it in Safari?

Three common causes. The mobile version of the site uses a different subdomain that isn’t on your list. Someone tapped Allow Website on the restriction screen because no Screen Time passcode was set. Or the page is opening inside another app’s built-in browser rather than in Safari.

How do I block Safari itself instead of individual websites?

On iPhone, Screen Time can restrict the Safari app directly, and AppBlock can select Safari from its blocklist using the in-app search. Be aware that blocking Safari entirely overrides any keyword blocking you’ve configured, since there’s no browser left for the keywords to filter.

Sources

Apple Inc. (2026). Block apps, app downloads, websites, and purchases on iPhone. Retrieved August 10, 2026, from https://support.apple.com/guide/iphone/block-apps-app-downloads-websites-purchases-iph3ff83f3b1/ios

Apple Inc. (2026). Change App Store, Media, Web, & Games settings in Screen Time on Mac. Retrieved August 10, 2026, from https://support.apple.com/guide/mac-help/mchlbcf0dfe2

Gain back control over your screen, empower your life with AppBlock.

Try for free
We use cookies!
We use cookies for the best website functionality, which we process according to our privacy policy. More information about cookies can be found here.