Shaun Abram
Technology and Leadership Blog
Blocking distracting websites
There are a couple of news and “social” websites that I spend too much time on (e.g. reddit, twitter etc). Below I list some options for blocking them, and their pros and cons.
TDLR: Distraction blockers (aka focus apps) such as Freedom.to are likely your best bet.
Distraction blockers (aka focus apps)
Tools like Freedom and BlockSite are useful and easy to configure. They both have limitations with their free versions (Blocksite: max of 3 sites; Freedom, max of 2 hours of blocking at a time), but the paid versions can be a quick and easy solution. This is the approach I recommend.
/etc/hosts file
You can edit your /etc/hosts, but I found getting Chrome to respect this a little tricky. You need to flush caches etc, but it’s tricky. So not an ideal solution.
Apple Screen Time
Apple’s Screen Time is a simple approach to blocking websites on Apple devices (mac or iphone), but I found it flaky with Chrome, so I didn’t pursue.
DNS level blocking
Sites can be blocked at the at the DNS level. I experimented with NextDNS (details below). The advantage is that the tool has a good free version, and can be used easily across all devices. But I found the solution to be problematic in that I was something unable to access the internet when using public wifi (like coffee shops), and had to disable NextDNS entirely.
This is likely because cafe Wi-Fi login pages work by hijacking DNS. And since NextDNS overrides your DNS, the login page never loads, and it looks like you have no internet. This a known weakness of DNS-based blocking.
So, a promising approach that just proved too much work. Still, details below if you are interested.
NextDNS setup
I created a (free) account, and using the default profile, added the problem sites (e.g. x.com) to the Denylist.
Instead of having to manually apply or update DNS settings, NextDNS make it easy.
Macbook:
Download the profile as a config file (e.g. a file named named NextDNS.mobileconfig generated from apple.nextdns.io) and they provide instructions on how to install it (e.g. System Settings > General > VPN & Device Management).
On phone (for me, android):
- Settings → Network & internet → Advanced → Private DNS on your phone
- Select “Private DNS provider hostname”
- Enter exactly: <profile name>.dns.nextdns.io
- Hit Save
NextDNS auto-blocks everything (including subdomains) in the denylist and you have one less distraction.
When I ran into problems, I used the steps below to disable.
Mackbook:
- Settings -> Device Management
- Remove the nextdns profile
- To re-enable, use the same steps as above again.
Or from the terminal:
- sudo profiles remove -identifier io.nextdns.c419cd.profile
Non technology solutions
Regardless of what technologies you use, the real challenge is handling those quick and fleeting urges to go your-distraction-site-of-choice.com. Some suggestions on= quick alternatives include:
- a quick stretch
- grab a glass of water
- walk 10 paces
- tidy
- write something (anything!)
Your mileage might vary.
Tags: distractions, productivity
Subscribe to RSS Feed