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