You know the pattern. You sit down to study, open your browser, and twenty minutes later you're watching videos, scrolling feeds, or reading something completely unrelated to your work. The site blocking approach works because it removes the decision entirely — you can't visit the site, so there's nothing to resist. This guide walks through browser-level, system-level, and router-level blocking methods across platforms, plus the attention science behind why this approach works. It connects to our broader start here roadmap and the focus pillar of our study guides.
Willpower is a limited resource. Website blockers are an environmental design solution — they change the environment so willpower isn't needed.
Why blocking works (the science)
The trigger for most digital distraction is automatic, not deliberate. You don't consciously decide to check social media. Your fingers type the URL before your conscious mind catches up. Psychologists call this a habit loop: cue → routine → reward.
A study by Oulasvirta et al. (2012) found that the average smartphone user checks their phone 34 times per day, with most checks triggered by habit rather than genuine need. The same principle applies to browser-based distraction.
Blocking tools interrupt the habit loop at the cue stage. When you type the URL and get a blocked page instead of the expected reward, the habit weakens over time. It's the same principle behind any environmental design for behavior change — make the undesirable behaviour harder and the desirable behaviour easier.
Google's Digital Wellbeing initiative has published research on how digital tools can be designed to support healthier usage patterns, reinforcing the idea that technology-assisted boundaries are a legitimate and effective strategy.
Method 1: Browser extension blocking
This is the quickest setup and works on any computer.
How to set it up:
- Open your browser's extension store
- Search for a website blocker extension (there are many free options)
- Add your distraction list (social media, video sites, news sites, forums — whatever pulls your attention)
- Set the block schedule to match your study sessions
- Enable the "nuclear option" if available — this prevents you from disabling the extension during a block session
Pros:
- Takes 2 minutes to set up
- Highly customizable
- Most have scheduling features (block during study hours, allow during breaks)
Cons:
- Only blocks one browser (you can switch to another)
- Can be disabled if you don't use a lock feature
- Doesn't block mobile apps
Best for:
Students who primarily study on a computer and need a quick, lightweight solution.
Method 2: System-level blocking (hosts file)
For a more robust solution, you can block websites at the operating system level by modifying the hosts file. This blocks access across all browsers.
How it works:
The hosts file is a system file that maps domain names to IP addresses. By mapping distracting domains to 127.0.0.1 (your local machine), you effectively make those sites unreachable.
On Windows:
- Open Notepad as administrator
- Open the file at
C:\Windows\System32\drivers\etc\hosts - Add lines like:
127.0.0.1 www.example-distraction-site.com - Save the file
- Flush your DNS cache (open Command Prompt and type
ipconfig /flushdns)
On macOS / Linux:
- Open Terminal
- Edit
/etc/hostswith a text editor (using sudo) - Add the same mapping lines
- Flush DNS cache
Pros:
- Works across all browsers
- Harder to bypass than a browser extension
- No additional software needed
Cons:
- Requires admin access
- Not time-scheduled (you have to manually edit to unblock)
- Doesn't work on mobile unless you modify mobile hosts (advanced)
Best for:
Students who want a strong block and are comfortable with basic system administration.
Method 3: Router-level blocking
If you want to block distracting sites across all devices on your network — including phones, tablets, and any other device connected to your WiFi — you can configure your router.
How to set it up:
- Log into your router's admin panel (usually at 192.168.1.1 or 192.168.0.1)
- Look for "Access Restrictions," "Parental Controls," or "URL Filtering"
- Add the domains you want to block
- Set a schedule if your router supports it
Pros:
- Blocks all devices on the network
- Harder to circumvent without VPN
- Can be scheduled
Cons:
- Affects everyone on the network (not just you)
- Router interfaces vary widely — setup can be confusing
- Some routers don't have URL filtering
Best for:
Students who study at home and want whole-environment blocking across all devices.
What to block (and what to allow)
Be specific. Don't try to block "the whole internet." Block the 5–10 sites that actually pull your attention. For most students, the usual suspects are:
- Social media platforms (all of them)
- Video streaming sites
- News aggregate sites
- Reddit-style forums
- Online shopping
Allow list: Keep access to sites you need for studying — your university portal, research databases, reference sites, and your email (if necessary).

The psychological approach: commitment devices
Blocking tools are most effective when combined with a commitment mindset:
- Set the block before you start studying — not after you've already been distracted.
- Make it hard to undo. Choose tools with lockout features. If you can disable the block in 3 seconds, you will.
- Pair with a timer. Block for your study session duration (25 or 50 minutes), then unblock during breaks. This prevents the feeling of permanent restriction.
- Track your patterns. Use the first week to notice which sites you try to visit most during study time. This data helps you refine your block list.
Try our Distraction Audit tool to systematically evaluate what's pulling your attention and how to address each distraction.
Do this today
- [ ] Install a browser-based website blocker
- [ ] Add your top 5 distraction sites to the block list
- [ ] Set it to activate during your next study session
- [ ] Try one full study session with the blocker active
- [ ] Note how many times you automatically try to visit a blocked site (the number will surprise you)
- [ ] After one week, evaluate: has your focus improved? Do you need to add or remove any sites?
Common mistakes I see
"I'll just block everything." Over-blocking creates frustration. You need access to legitimate study resources. Block specifically and intentionally.
"I can just use my phone instead." If you block websites on your computer but your phone is sitting right there, you've solved nothing. Phone goes in another room during study sessions, or use a mobile-specific blocker.
"I should be able to resist without a blocker." This is like saying you should be able to diet while working in a bakery. Environmental design isn't weakness — it's strategy.
"Blocking doesn't work because I just turn it off." Use a tool with a lockout feature that prevents disabling during active sessions. If you keep overriding your own block, the tool isn't the problem — your commitment device needs to be stronger.
Frequently asked questions
Won't I just find a way around the block?
Maybe. That's why commitment devices matter. The block isn't meant to be an impenetrable wall — it's meant to add friction. Even 10 seconds of friction is enough to interrupt the automatic habit and give your conscious mind time to intervene.
Should I block during all study time or just deep-focus sessions?
Start with deep-focus sessions only. During lighter study tasks (organising notes, reviewing flashcards), the distraction risk is lower. As you build the habit, you may choose to extend blocking to all study time.
What about messaging apps?
If they're a distraction, block them too — or at minimum, mute notifications during study sessions. Most messages can wait 25–50 minutes. For genuinely urgent contacts, give them your phone number for calls only.
Is it okay to use social media during breaks?
Yes, if your breaks are timed. A 5-minute social media check during a Pomodoro break is fine. The danger is when "5 minutes" turns into 25. Set a timer for your break too.