1. The hosts file (Windows, Mac and Linux)
The hosts file tells your computer where to find a website before it asks the internet. Point a site at an address that goes nowhere, and it won't load in any browser.
- Open the file as administrator. On Windows, open Notepad as administrator, then open C:\Windows\System32\drivers\etc\hosts. On Mac or Linux, run sudo nano /etc/hosts in Terminal.
- Add a line for each site, like 0.0.0.0 reddit.com, and another for www.reddit.com.
- Save the file and restart Chrome. If the site still opens, clear Chrome's saved addresses at chrome://net-internals/#dns, or restart the computer.
The catch with the hosts file
It blocks whole sites only, so you can't keep YouTube and lose Shorts. There are no schedules or time limits, every change needs admin rights, and a site that uses many addresses may need several lines.
2. Chrome's URLBlocklist policy
Chrome has a policy meant for schools and companies that blocks sites inside Chrome itself. Unlike the hosts file, it can block part of a site, like youtube.com/shorts, and Chrome shows its own block page. On Windows:
- Open Registry Editor (regedit) as administrator.
- Go to HKEY_LOCAL_MACHINE\SOFTWARE\Policies, and create the keys Google, then Chrome inside it if they don't exist.
- Inside Chrome, create a key named URLBlocklist.
- Inside URLBlocklist, add a String Value named 1 with the value reddit.com, another named 2 with youtube.com/shorts, and so on.
- Restart Chrome and open chrome://policy to check the list is there.
URLBlocklist on Linux and Mac
On Linux, create the file /etc/opt/chrome/policies/managed/blocklist.json containing {"URLBlocklist": ["reddit.com"]} and restart Chrome. On a Mac, Chrome policies are normally installed with a configuration profile, which is more involved; the hosts file is the simpler choice there.
Once a policy is set, Chrome's menu says your browser is managed by your organization. That's expected, and it goes away when you remove the policy.
3. A DNS filter
A DNS filter blocks sites before they reach any browser or app on the device, including Incognito and private tabs. Services like NextDNS have a free tier where you pick sites or whole categories to block. It's the best option for adult content, and the only one of the three that also works on phones.
What about Chrome's own settings?
Chrome's site settings can stop a site sending notifications or opening pop-ups, but they can't stop it loading. Google Family Link can restrict sites, but only on supervised accounts for children.
When an extension is the better choice
None of these methods offer schedules, time limits, a pause before a site opens, or hiding a feed while keeping the site, and none show your progress. If you want any of that, an extension like ZenTab is quicker to set up, easier to change, and doesn't need admin rights.