Modifying hosts file does not have any effect Since I spend too much time on websites such as 9gag.com and the like, I decided to try and block them by modifying the hosts file on my rooted Nexus 5. 

So I created a new hosts file using notepad++, which looks like this : 

127.0.0.1 board.4chan.org
127.0.0.1 4chan.org
127.0.0.1 9gag.com
127.0.0.1 www.9gag.com
127.0.0.1 www.4chan.org


etc., saved it as a file without extension, and replaced the original "hosts" file found in system/etc with the new file. However, it does not have any effect and I can still access all those websites as easily as before. I'm using Chrome as my browser.

I checked that the new lines are LF and not CR+LF (read somewhere that it could make the hosts file work not properly) and that the file has no extension (File Explorer shows it as a "file", that's all). When I try to edit the hosts file with an app called Hosts Editor, it looks like everything is good and like my device should redirect the websites I'm trying to reach to localhost.

So my question is : why is this not working? What have I done wrong?

Thanks a lot!
To expand on the update that was made by the OP:

Chrome stores its own DNS cache for sites that you have visited.  This cuts down on DNS resolution time when browsing sites that you have recently visited.  However, this happens before the hosts file is checked for DNS resolution (so your new hosts entries will not be checked if they are in the Chrome DNS).  Therefore, you need to clear out Chrome's DNS cache.  You can go to chrome://net-internals/#dns and clear it out from there.

The order in which Chrome checks for DNS (from first to last) is:  local-cache->hosts-file->DNS-Server