How to Block Pornography on Mac (Free System-Wide Guide)

Whether you're setting up a computer for a child or practicing self-discipline, blocking adult content on macOS is a common need. Browser extensions (like "BlockSite") are easy to bypass—any savvy user can just disable the extension or use a private window.

To truly block access, you need to cut it off at the system level. Here are three ways to do it.


Option 1: The Hard Way (Terminal)
Free

You can use the StevenBlack "Porn" blocklist (a massive text file of adult domains) and paste it into your system hosts file.

sudo nano /etc/hosts

You will need to copy 100,000+ lines of text into this file. Warning: Handling this many lines in nano can be slow or crash the terminal.

Pros
  • Completely free
  • Effective blocking
Cons
  • Hard to update (new sites appear daily)
  • Risk of system lag with huge files
  • No easy way to temporarily disable
Option 2: The DNS Way
Free / Paid

You can change your Mac's DNS settings to use a "Family Safe" provider like OpenDNS Family Shield or CleanBrowsing.

Pros
  • Blocks categories automatically
  • No software to install
Cons
  • Can be bypassed by changing DNS back
  • Does not work if you use a VPN
  • Slows down all browsing slightly
Option 3: The Sane Way
$5 One-Time

SaneHosts makes the hosts file method usable. It downloads the massive "StevenBlack Porn" list for you, parses it safely, and locks it behind Touch ID.

Why it wins
  • Touch ID Locked: Prevents easy bypassing (requires auth)
  • Family Safe Preset: One click to set up
  • Fast: Uses optimized local parsing, no lag
  • Auto-Updates: Keeps the blocklist fresh
Get SaneHosts — $5

Compatible with macOS 14 (Sonoma) and later.