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

  • Custom name for the block set:
  • Domain names to block:
  • Block from midnight to 10AM and 10PM to midnight:

  • 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.