Adblocking

Why?

Methods of adblocking

Here are some ways traffic can be filtered.

In your web browser

At the network level (local DNS blocking)

This can efficiently filter all of the devices in your home network (phone, laptop, PC, etc.). Some people run adblockers on a Raspberry Pi or as a docker container on a server. These operate by becoming the DNS server to all of the devices on your network.

At the DNS level (upstream DNS servers)

In most home settings, one's WiFi router defines your DNS server. This server provides IP addresses (e.g. what is the IP for google.com?). Set your upstream DNS server to one that filters out ad providers, trackers, known scammers/hackers, etc.). Once you, it then provides this filtering for all devices in your network.

Whitelist

The whitelist is a list of things not to block so that the adblocker doesn't break things. You can find existing lists to try to prevent false positives (blocking things that you don't want to be) and add to it over time.

Pre-made whitelists:
 - Anudeep ND Whitelist (domains) (homepage)
 - Commonly whitelisted domains - Pi-hole Forum

Adblocking on Smartphones

Smartphones are tricky because you want to fliter traffic coming from apps as well as the browser. The best way to do this is having something upstream of the phone — like a VPN or DNS server — that captures and filters the traffic.

Tracking

Some also prefer to filter out software trackers and telemetry, used to collect various data about one's use of devices. Much of this may be recording innocuous information about how software is used.

Some examples of not-so-innocuous tracking would be a mobile app sharing one's location data or a VR headset sharing what one's house looks like.

Blocklists

Blocklists are lists that the adblocking software uses to match what content to block.
See Types of blocklists