Edits hosts file ignored by chrome 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

127.0.0.1     localhost
::1           ip6-localhost
127.0.0.1     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 127.0.0.1 you have to add it exactly that way to your hosts files. 

However you only redirected the main domain youtube.com to 127.0.0.1. 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.