You sit down to study or finish a report, open one distracting site for “just a minute,” and lose the next stretch of time to tabs, notifications, or your phone. Blocking that site on one laptop browser helps, but it doesn't solve the actual problem if another browser, an alternate connection, or a second device remains available.
The practical answer to how to block websites on a laptop is to combine the right control with enough friction to interrupt the habit, without blocking the tools you really need. This guide covers Windows, macOS, browsers, network controls, and cross-device options, including Kohru, an app that helps block distractions on your phone and laptop at the same time and is built for students.
Table of Contents
- Why Blocking Websites on a Laptop Is Harder Than It Looks
- The Five Main Blocking Methods at a Glance
- Blocking Websites on Windows Step by Step
- Blocking Websites on macOS Step by Step
- Browser Extensions, Routers, and Cross-Device Apps
- Schedules, Temporary Blocks, and Bypass Prevention
- Troubleshooting and When Blocking Actually Backfires
Why Blocking Websites on a Laptop Is Harder Than It Looks
A student opens a laptop to revise for an exam. They block Instagram in Chrome, then switch to Edge when the urge appears. If that fails, their phone is beside the notebook, connected through mobile data. The block worked exactly as configured, but the focus session still failed because the distraction had several escape routes.
A remote worker faces the same problem in a different form. They add social media to a browser extension, then open a private window, use another browser profile, or reach for a phone during a difficult task. A URL list is only one layer. Focus depends on coverage, friction, and a plan for legitimate exceptions.

Blocking is a habit system
Website blocking works best when it interrupts an automatic decision before the distracting page opens. A warning, delay, scheduled session, or strict block can create that pause. The right level depends on whether you're trying to reduce impulsive checking, supervise another user, or make access difficult during a defined study period.
Kohru fits the cross-device version of this problem. It helps block digital distractions on a phone and laptop at the same time, which matters for students who move between devices during one study session. A laptop-only rule can't control what happens on a phone.
The research is useful but not a reason to install the most aggressive blocker available. A foundational workplace study published in 2018 tested website blocking with 32 information workers. During the intervention, participants reported significantly higher productivity and longer periods of focus, but participants with lower self-control also tended to take fewer breaks and experienced higher stress in the study's findings.
Practical rule: Block the distractions that repeatedly interrupt your work, not the entire internet you need to complete it.
That principle determines the rest of the setup. Judge each method by browser coverage, device coverage, bypass resistance, and ease of recovery, not just by how quickly it adds a URL.
The Five Main Blocking Methods at a Glance
You don't need every method. Choose the lightest control that reliably changes your behavior, then add another layer only when a clear gap remains.

Built-in operating-system controls
Microsoft Family Safety can block or allow specific website URLs and can switch to an Only use allowed websites mode. On Apple devices, Screen Time supports content restrictions, website limits, and app limits. These options make sense for family-managed accounts or users who want settings tied to an operating-system account rather than a single extension.
Their weakness is coverage. Microsoft states that its web filters apply through Edge and supported Family Safety apps, so other browsers must be blocked separately for the restriction to function as intended Microsoft Family Safety's filtering guidance.
The Windows hosts file
The hosts file is free and works at a system-wide browser level for listed hostnames. It suits a quick personal block on Windows, but it isn't secure enforcement. An administrator can delete the entries, and VPNs, proxies, encrypted DNS, alternate domains, or mobile tethering can bypass the result.
Browser extensions
Extensions are the fastest choice for a short focus session. They usually support custom lists and schedules, but they live inside one browser profile. A second browser, private browsing, another account, or a removed extension can end the protection.
Router and DNS filtering
Router-level controls cover devices connected to the same network, which is useful for a household or supervised environment. DNS filtering can extend coverage beyond a single browser, but it can be too broad for an individual who needs different access rules during work, study, and personal time. For a deeper explanation of how DNS filtering works in practice, Blowfish Technology DNS filtering is a useful technical resource.
Third-party focus apps
A cross-device app is the better fit when the problem is a repeated habit rather than one website. These tools can combine blocklists, scheduled sessions, adjustable strictness, and progress feedback. They may require more setup or a paid tier, but they address the phone and laptop gap that browser controls leave open.
Research on digital self-control interventions supports adjustable strictness. Blocking can range from warnings and usage statistics to temporary or complete denial of access. A deliberate task also changes the barrier: entering 30 digits reduced distraction initiation more strongly, with d = 0.47, than entering 10 digits, with d = 0.27, or receiving a simple warning, with d = 0.13 the systematic review of digital self-control interventions.
Blocking Websites on Windows Step by Step
A Windows laptop can block a distracting site in minutes, but the right method depends on who controls the machine. Use Microsoft Family Safety for supervised accounts. Use the hosts file for a narrow, local block on your own laptop.
Use Microsoft Family Safety for managed accounts
Open Microsoft Family Safety, select the relevant family member, and choose Content filters. Add the website URLs to the blocked list, or turn on Only use allowed websites when the account should reach only approved pages.
This approach suits a child or supervised student because the rule follows the account instead of relying on one browser extension. As noted in the methods overview, Microsoft's filters apply through Edge and supported Family Safety apps, so other browsers must be blocked separately.
Because the policy is account-bound, verify it on every browser profile the student uses, including school-managed browsers installed outside the default Edge setup. Test the blocked domain while signed in to each relevant account. A block that works in one profile can leave another profile untouched.
Edit the hosts file for a local block
For a personally managed laptop, the hosts file is quick and focused:
- Open Notepad with administrator privileges.
- Open
C:\Windows\System32\drivers\etc\hosts. - Add one line for the target domain and another for its
wwwvariant, mapping each hostname to127.0.0.1. - Save the file.
- Restart the affected browsers fully, then test the site.
Leave out https:// and every other URL scheme. Hosts-file rules use hostnames, not complete web addresses. Include both hostname variants because a browser may request a different one from the entry you added.
This blocks normal hostname resolution for the listed names, but it is not tamper-proof. An administrator can remove the entries, while encrypted DNS, VPNs, proxies, browser DNS caches, and mobile tethering can bypass or sidestep the rule, as Microsoft explains in its hosts-file troubleshooting response.
Use this method for a short personal distraction list. Choose stronger account or network controls when you need supervision or enforcement.

