The technology known as the “PiHole” has become quite ubiquitous over recent years. The PiHole allows you to create a DNS server that stops tracking entirely, across your entire network. However, what happens when you need to leave home. What happens when you go to work or go to a local coffee shop? Now, you’re once again vulnerable to cross-site tracking, maybe not in your browser that has an extension like DuckDuckGo, but with the many apps that may be installed on your system. That’s when you need to stop cross-site tracking systemwide. Luckily, thanks to the way PiHole is set up, that process is extremely easy to do.
Thank you for Steven Black and his community for creating and uploading this list, available at https://github.com/StevenBlack/hosts
Step 1: Download Hosts File
First of all, you need to download the hosts file. Click the button below to get an up-to-date hosts file created by PiHole themselves!
How to Stop Cross-Site Tracking Systemwide on Mac or Linux/Unix
Now that you’ve downloaded the file, assuming the “hosts.txt” file you just downloaded is in your “Downloads” folder, open “Terminal” and type the following command. Type your password when prompted:
sudo install -m 644 ~/Downloads/hosts.txt /etc/hosts
Once the file is installed, you should notice the difference immediately. You may need to reboot to clear the cache, but after that you should be good to go. All your apps and websites will now be prevented from using third-party trackers.
Note: This file gets updated regularly. Make sure you visit this article more often as new trackers are discovered. If you do not remember the link to this article, it can be found at https://infotoast.org/aka/hosts.
How to Stop Cross-Site Tracking Systemwide on Windows
Windows is not much different, but the location of the file is a little bit different.
Go to Start, type “cmd”, right-click on Command Prompt, and click “Run As Administrator”
Now, type the following command and press enter:
copy C:\Users\<yourname>\Downloads\hosts.txt C:\Windows\System32\drivers\etc\hosts
All you should need to do after this is reboot your computer. This should clear the DNS cache and you will be free from advertisements or trackers for your entire system, regardless of where you go (unlike PiHole which only works for local networks)