Guide · 6 min read

How to block a website on Chrome without an extension

Maybe you don't want another extension, or you want a block that's harder to switch off. Chrome can block sites without one; it's just less convenient. Here are the three methods that work on a computer, step by step.
Updated · By the ZenTab team

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.

  1. 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.
  2. Add a line for each site, like 0.0.0.0 reddit.com, and another for www.reddit.com.
  3. 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:

  1. Open Registry Editor (regedit) as administrator.
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Policies, and create the keys Google, then Chrome inside it if they don't exist.
  3. Inside Chrome, create a key named URLBlocklist.
  4. Inside URLBlocklist, add a String Value named 1 with the value reddit.com, another named 2 with youtube.com/shorts, and so on.
  5. 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.

Frequently asked questions

Can I block a website in Chrome without an extension?

Yes. Edit your computer's hosts file, set Chrome's URLBlocklist policy, or use a DNS filter. Each works in Chrome without installing anything in the browser.

Does the hosts file block sites in Incognito?

Yes. It works below the browser, so Incognito and every other browser on the computer are blocked too.

How do I undo a URLBlocklist block?

Delete the value, or the whole URLBlocklist key, in Registry Editor (or the JSON file on Linux), then restart Chrome.

Try ZenTab free

Block distracting sites, hide endless feeds and grow a focus streak. Free forever, with a 7-day Pro trial and no card. Pro is $10 once, with a 14-day money-back guarantee.