← All articles

How to block distracting websites on Windows, for free

Willpower is a bad plan for a site that was designed by hundreds of engineers to keep you there. Blocking works better because it moves the decision: you decide once, while you are calm, instead of forty times a day while you are tired. Here are the free ways to do it on Windows, from the bluntest to the most useful.

1. The hosts file: total, and clumsy

Windows has a file that can send any site nowhere. Open Notepad as administrator, open C:\Windows\System32\drivers\etc\hosts and add a line per site:

127.0.0.1 www.youtube.com

It works in every browser and every app. It is also all or nothing: no schedule, no "thirty minutes a day", and you need administrator rights and a text editor each time you change your mind. Good for a site you never want to see again. Bad for a site you want to use less.

2. A blocker extension: easy, per browser

Extensions that block a list of sites are simple to set up and usually offer schedules. Their limit is that they only know what happens in that one browser: they cannot count the time you already spent today, and they do not know which sites are actually your problem. You are guessing the list.

3. Focus sessions: block only while you work

Most people do not want YouTube gone. They want it gone for the next fifty minutes. A focus session does that: you press a button, distracting sites are blocked until the timer ends, and then everything comes back by itself.

In zman, press Focus and pick 25, 50 or 90 minutes. Every site in a distracting category is replaced by a countdown. You do not maintain a list: the same categories that classify your time decide what gets blocked.

4. Daily limits: the one that changes habits

A limit says "YouTube, 30 minutes a day" or "Entertainment, one hour a day". You can use the site normally, and when the time runs out it is blocked until tomorrow. This is the option that tends to stick, because it does not ask you to give anything up, only to notice when you have had enough.

It needs something a plain blocker does not have: a count of the time you actually spent. That is why it fits naturally in a time tracker. In zman, limits can be set per site or for a whole category, and you can add focus hours ("no social media from 9 to 6, Monday to Friday").

Which one to use

Start by measuring

Before blocking anything, look at a normal week. The sites you think are the problem are often not the ones that take the time. Track first, then block the two or three that actually show up at the top of the list.

An honest limit

All of these are tools for self-control. If you really want to get around them, you can: another browser, a private window, turning the thing off. That is fine for an adult managing their own attention. It is not a parental control, and nothing in this article should be used as one.

See where your own time goes

zman is a free, open source automatic time tracker for Windows. Your data stays on your computer.

Download zman free