I'm trying to cut down on procrastination in a fun way (read hacking) by rooting my phone (moto g2) and editing the /system/etc/hosts file like this     localhost
::1           ip6-localhost     youtube.com
(trailing newline)    

I tried the following fixes:

  • Turning off Data Saver
  • Clear all data in Settings->Storage->Apps
  • Clear cache from chrome://net-internals/#dns and clear
  • Reboot

Still I'm perfectly able to access www.youtube.com, no problemo. Any thoughts?


If you want to redirect www.youtube.com to you have to add it exactly that way to your hosts files.

However you only redirected the main domain youtube.com to not the subdomain www.youtube.com. Note that this does not affect subdomains. If you want to cut of Youtube completely you have to add every subdomain to your hosts file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.