Blocking Browser Ads, the DIY Way

Q: How do I block browser advertisements without purchasing an ad blocker?

A: Adding entries to your HOSTS file enables you to block advertisements by blocking ad-servers’ domains. To install:

1] download the “hosts.zip” file from this website.

2] install it as follows:

For Windows PC: instructions on that page help you install the HOSTS file on your computer.

For MacOS: I copied the contents of the text file in hosts.zip, and added it to my Mac’s HOSTS file by

  1. double-clicking my hard drive icon;
  2. pressing ⌘-Shift-Period in the Finder window to view all files;
  3. double-clicking the etc folder, then
  4. opening the HOSTS file in a text editor (I use Visual Studio Code), pasting in the clipboarded contents, and saving.

For Unix: heck if I know

Leave a comment