1. Choose what to block
Select any preset bundles below, add your own websites, or mix both.
2. Copy or download
0 domains · 0 linesHow to apply your generated hosts blocklist
Always append to the bottom of your existing hosts file — never delete the default localhost entries at the top.
- Open Terminal and edit the system hosts file as administrator:
sudo nano /etc/hosts
- Scroll to the bottom, paste the generated blocklist, press
Ctrl+OthenEnterto save, andCtrl+Xto exit. - Flush the macOS DNS cache so blocks take effect immediately:
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
- Click Start, type Notepad, right-click it, and choose Run as administrator.
- Choose File → Open, switch the file filter from Text Documents (*.txt) to All Files (*.*), and open:
C:\Windows\System32\drivers\etc\hosts
- Paste the generated entries at the bottom, save the file, then open Command Prompt and flush DNS:
ipconfig /flushdns
- Edit
/etc/hostswith root permissions:sudo nano /etc/hosts
- Paste the generated blocklist at the bottom and save.
- If your distro runs
systemd-resolved, flush the cache:sudo resolvectl flush-caches
Why a blocked site might still load in Chrome
- IPv6 fallback: Modern routers and browsers try IPv6 (
AAAA) alongside IPv4. Keep Include IPv6 (::) enabled above so both protocols sinkhole locally. - DNS-over-HTTPS (Chrome Secure DNS): If Chrome uses an encrypted DNS resolver, some browser connections may bypass local DNS caches until Chrome is restarted or Secure DNS is set to your OS resolver in
chrome://settings/security. - Open tabs & HTTP/3 connections: Existing QUIC/HTTP3 connections stay open briefly after editing
hosts. Restart Chrome or openchrome://net-internals/#dnsand click Clear host cache. - Sub-paths (like YouTube Shorts or one subreddit): A
hostsfile works only at the domain level — it cannot blockyoutube.com/shortswhile keepingyoutube.comopen. For path or keyword blocking in Chrome, see our guide to blocking YouTube Shorts or use Sitefence.