Posts

Adblocker using hosts file

Adblocker using hosts file is my tip to you too remove websites commercials on your mac. You can use the same idea on Windows or Linux. Using the hosts file to remove ads, makes it possible to remove ads without using an adblocker. This can speed up internet browsing, relieve you of ads, and increase online privacy. by modifying your hosts file on any OS wether you are using OS X, Linux or Windows. Follow the link to see how it is done for Windows, for Unix such as OS X (mac) or Linux, follow the guide

Follow the link to see how it is done for Windows, for Unix such as OS X (mac) or Linux, follow the guide below the link.

Windows: Blocking sites with a Hosts File.

Adblocker using hosts file on mac

To block sites on mac, we must edit the hosts file. The hosts file is a system file that assists in addressing network nodes in a network. Using the hosts file you can re-route requests from your computer to other DNS or IP addresses. This is done by stating first the request IP followed by the destination IP. In doing that you can take control of the sites that should be rendered or not by re-directing all ads or commercials to a localhost, or self-chosen site. Whenever every time you attempt to access a site or an IP address, your computer will look into your hosts file. If you have inputted a source and destination IP, the computer will look up the site based on that information.

Start blocking sites on mac

  • Open the Terminal
  • Type the following to open your hosts file with TextEdit.
sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts

You will be prompted for your administrator password – go ahead and type that. Hereafter add the hosts from this file from http://winhelp2002.mvps.org/hosts.txt

Block sites in Linux or any other Unix based operating system

  • Open your favorite terminal app
  • Type the following
sudo nano /etc/hosts

You will be prompted for your administrator password – go ahead and type that. Hereafter add the hosts from this file from http://winhelp2002.mvps.org/hosts.txt