How to Unblock One Site Without Turning Off Your Mac Blocklist

Big blocklists catch the odd site you actually need: a store's checkout, a login page, a link in a newsletter. Turning protection off fixes that site and unblocks everything else too. The better fix is to allow that one site.

Why the obvious fix does not last

Every blocked site is one line in /etc/hosts, such as 0.0.0.0 shop.example.com. You can delete or comment out that line by hand:

sudo nano /etc/hosts
# 0.0.0.0 shop.example.com
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder

That works until the list updates. A fresh copy of the list puts the line back, and the site breaks again. Most lists also block a site's subdomains on separate lines, so one edit is often not enough.

The lasting fix: an allowed sites list

An allowed sites list sits on top of every blocklist. Before the hosts file is written, any blocking line for an allowed site is left out. List updates cannot bring it back, because the check runs on every write.

How to allow a site in SaneHosts

Always Allow from an entry, then Allowed Sites in the sidebar. Recorded in SaneHosts 1.1.27.
  1. Find the blocked site in your profile's entries. The search box filters thousands of entries as you type.
  2. Right-click it and choose Always Allow. SaneHosts saves it and applies the change at once.
  3. To add a site by hand, click Allowed Sites in the sidebar and paste the address. A full link such as https://shop.example.com/cart is trimmed to shop.example.com.

An allowed site covers its subdomains, so allowing example.com also allows www.example.com. Look-alikes such as badexample.com stay blocked.

What stays the same

Try it on your Mac
14-day trial

SaneHosts manages your Mac's hosts file for you: pick a protection level, allow the sites you need, keep lists current, and lock it if you want. Try it free for 14 days, then $14.99 once. No subscription.

Get SaneHosts

Works on macOS 14 (Sonoma) and later.

Questions

Does allowing a site turn off protection?

No. Every other blocked site stays blocked. Only the sites on your Allowed Sites list are left out of the hosts file.

Will a list update block the site again?

No. SaneHosts checks your Allowed Sites list every time it writes the hosts file, including after list updates.

Can I undo it?

Yes. Open Allowed Sites in the sidebar, remove the site, and save. It is blocked again right away.

Related guides