how to block subdomains using host file in windows

Solution 1:

I would simply add this list to the hosts file: https://pastebin.com/vfR30GmS That is a list of 115 facebook.com subdomains. Remember to block facebook.com itself too.