block most of internet crap (fakenews, gambling, malware, adware and porn)
It's a file or collection of files located in specific directory/folder in your operating system that replaces huge number of fakenews, gambling, malware, adware and porn sites/providers with a non-routable meta-address used to designate an invalid.
Source and Inspiration: StevenBlack's hosts
When you search something in your web browser it first checks hosts file of your system and then searches for the website in dns server. So what we are doing is, replacing all those crap websites with 0.0.0.0 before accessing the dns server. And thus, you're unable to access those websites at any cost unless you modify it in the hosts file. Using VPNs are also worthless in this practice.
Don't forget to take a backup of your original host file before replacing it.
locate your hosts file at: %SystemRoot%\system32\drivers\etc\hosts
and replace it with the hosts file linked here.
Locate your hosts file at: /etc/hosts
and replace it with the hosts file linked here.
Replace your /etc/resolv.conf
file with the resolv.conf
file here which is a write protected file containg family protection dns servers of adguard.
Locate your hosts file at: /etc/hosts
and replace it with the hosts file linked here.
Locate your hosts file at: /private/etc/hosts
and replace it with the hosts file linked here.
Preview hosts
Check what's there in hosts file here. Cause the file is too large to show the preview directly.
1. Identify the website you want to block in your system. For example: example.xyz
2. Open your hosts file in your computer and append the following:
0.0.0.0 example.xyz