How to block YouTube on your phone and computer
Watching YouTube, becoming unaware of time, and missing the entire day is common. Will power is not enough to moderate your internet habits because it requires perpetual, active conscientiousness and abstinence, so relying on device customization is better in the long run because it does not require effort on your part past the initial setup.
Block YouTube on your phone
Download the LeechBlock plugin into your phone’s browser and use the plugin settings to block YouTube. For example, I modified Block Set 1 to block all youtube URLs except for music.youtube.com:
- Custom name for the block set:
youtube.com
- Domain names to block:
*youtube* +music.youtube.com/
-
Block from midnight to 10AM and 10PM to midnight:
0000-1000,2200-2400
- Turn on these rules every day of the week:
- Sun
- Mon
- Tue
- Wed
- Thur
- Fri
- Sat
Block YouTube on your computer
Execute sudoedit /etc/hosts
and add the following hostname-to-IP-address maps.
Restart your browser or computer for changes to take effect.
Block YouTube shorts to escape the algorithm
It is possible to use browser extensions like Unhook or UnTrap for YouTube to block YouTube shorts and modify other aspects of the page. These extensions work on Chrome, Brave, Firefox, and their mobile versions.
After installing Unhook, the option to “Hide shorts” needs to be enabled manually.