ClarydaENFRSign inAdd to Chrome
GuideMethods

Block a website on Chrome: 4 ways

Chrome has no button to block a site. There are four ways to do it: an extension, the computer's hosts file, a Chrome policy, or Family Link for a child's account. For yourself, the extension is the simplest.

Updated November 2, 20264 min read

The four ways at a glance

WayForWhat it takesTo undo it
An extension (Claryda)You, in your browserOne click, no accountFrom the extension, after a confirmation
The hosts fileThe whole computer, every browserAdministrator rights; one line per addressRemove the line from the file
A Chrome policy (URLBlocklist)Chrome, on that computerAdministrator rights; the registry or a policy fileOnly as an administrator
Family LinkA child's Google accountA supervised account; the parent's appOnly by the parent

1. With an extension

It's the only way that needs no administrator rights, and the only one that does more than block. With Claryda:

  1. Add Claryda to Chrome from the Chrome Web Store. No account to create.
  2. Open the site to block, click Claryda's icon in the toolbar, then “Block this site”.
  3. The site shows Claryda's page instead, its subdomains included.
Claryda's popup on a site that isn't blocked yet.

2. With the hosts file

The hosts file tells the computer which address goes with a site's name. Point a site to 0.0.0.0 there, and no browser on the computer opens it any more. On Windows:

  1. Open Notepad as administrator (right-click, “Run as administrator”).
  2. Open the file C:\Windows\System32\drivers\etc\hosts (choose “All files” to see it).
  3. Add one line per address, for example 0.0.0.0 youtube.com, then 0.0.0.0 www.youtube.com, and save.

On macOS and Linux, the file is /etc/hosts, opened with sudo in a terminal. If the site still opens, clear Chrome's cache at chrome://net-internals/#dns (“Clear host cache”).

  • One line per address: m.youtube.com or music.youtube.com have to be added one by one.
  • No category, schedule or time limit, and Chrome shows a “This site can't be reached” error rather than a blocked page.

3. With a Chrome policy

Chrome reads policies set by the computer's administrator. The URLBlocklist policy blocks a list of addresses, and the user can't remove it from Chrome. On Windows:

  1. Open the Registry Editor (regedit) as administrator.
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome\URLBlocklist, creating the keys that are missing.
  3. Add a string value named 1 with youtube.com as its data, then 2, 3… for the next sites.
  4. Restart Chrome, then check at chrome://policy that URLBlocklist is listed.

An entry youtube.com also blocks its subdomains. On a Mac, the same URLBlocklist key goes in a configuration profile; on Linux, in a JSON file in /etc/opt/chrome/policies/managed. A mistake in the registry can trouble Windows: touch only this key.

Chrome then says it's “Managed by your organization” in its menu, and a blocked site shows the error ERR_BLOCKED_BY_ADMINISTRATOR.

Google's Family Link supervises a child's Google account. The parent manages the sites Chrome blocks for that account from the Family Link app, in the Google Chrome settings. It only works on a supervised account, not on yours.

Which one to pick

  • For yourself, every day: the extension. It takes one click, blocks whole categories and can limit a site instead of shutting it.
  • For the whole computer, every browser: the hosts file, if a few addresses are enough.
  • For a shared or managed computer: the Chrome policy, which only an administrator can undo.
  • For a child: Family Link.

To block on the whole network, phones included, see the DNS filter in the guide Block adult sites on Chrome.

Questions

Does Chrome have a setting to block a site?
No. Chrome's settings block a site's notifications or pop-ups, not the whole site. It takes one of the four ways above.
What about Incognito windows?
The hosts file and the Chrome policy block there too. An extension only works in Incognito if you allow it; Claryda's welcome page shows you where.
Does it work on a phone?
These ways are for the computer, except Family Link, which also manages the child's phone.

Block a site, in one click.

Add to ChromeFree

Also for Edge, Brave, Opera and Arc

Read next