Free Browser Tool · Zero Upload

Free Hosts File Website Blocker Generator

Pick distraction categories or paste your own domains to generate a clean, ready-to-paste hosts blocklist for Windows, macOS, and Linux — complete with www., mobile m., and IPv6 (::) entries.

100% client-side · Zero network requests · MIT open source on GitHub

1. Choose what to block

Select any preset bundles below, add your own websites, or mix both.

2. Copy or download

0 domains · 0 lines

        

Want scheduled blocks, Pomodoro focus sessions, or path blocking (like youtube.com/shorts)?

The system hosts file blocks whole domains 24/7 until you manually edit it again. Sitefence is a free, local-only Chrome extension that blocks up to 2,000 sites, URL paths, and keywords with work-hour schedules and a built-in Pomodoro timer — no account, zero network calls on Free.

Add Sitefence to Chrome — Free See Sitefence details

How 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.

  1. Open Terminal and edit the system hosts file as administrator:
    sudo nano /etc/hosts
  2. Scroll to the bottom, paste the generated blocklist, press Ctrl+O then Enter to save, and Ctrl+X to exit.
  3. Flush the macOS DNS cache so blocks take effect immediately:
    sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
  1. Click Start, type Notepad, right-click it, and choose Run as administrator.
  2. Choose File → Open, switch the file filter from Text Documents (*.txt) to All Files (*.*), and open:
    C:\Windows\System32\drivers\etc\hosts
  3. Paste the generated entries at the bottom, save the file, then open Command Prompt and flush DNS:
    ipconfig /flushdns
  1. Edit /etc/hosts with root permissions:
    sudo nano /etc/hosts
  2. Paste the generated blocklist at the bottom and save.
  3. If your distro runs systemd-resolved, flush the cache:
    sudo resolvectl flush-caches