https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts (https://winhelp2002.mvps.org/hosts.txt) (https://adaway.org/hosts.txt) (https://someonewhocares.org/hosts/hosts) # Regular Expressions: ^ad([sxv]?[0-9]*|system)[_.-]([^.[:space:]]+\.){1,}|[_.-]ad([sxv]?[0-9]*|system)[_.-] ^(.+[_.-])?adse?rv(er?|ice)?s?[0-9]*[_.-] ^(.+[_.-])?telemetry[_.-] ^adim(age|g)s?[0-9]*[_.-] ^adtrack(er|ing)?[0-9]*[_.-] ^advert(s|is(ing|ements?))?[0-9]*[_.-] ^aff(iliat(es?|ion))?[_.-] ^analytics?[_.-] ^banners?[_.-] ^beacons?[0-9]*[_.-] ^count(ers?)?[0-9]*[_.-] ^mads\. ^pixels?[-.] ^stat(s|istics)?[0-9]*[_.-] ===================================================================== This is a custom regex filter file for use with Pi-hole v4+ (FTLDNS). --------------------------------------------------------------------- The purpose of this list is to compliment your existing blocklists using powerful regular expressions that can cover a very broad range of domains. A single regular expression can block thousands of 'bad' domains, and can even accommodate for domains following specific patterns that may not even (yet) exist on standard blocklists. All commands will need to be entered via Terminal (PuTTY or your SSH client of choice) after logging in and Python 3.6+ is required. ADD TO Pi-Hole curl -sSl https://raw.githubusercontent.com/mmotti/pihole-regex/master/install.py | sudo python3 REMOVE FROM Pi-Hole curl -sSl https://raw.githubusercontent.com/mmotti/pihole-regex/master/uninstall.py | sudo python3 KEEP REGEXPS UP-TO-DATE WITH CRON (optional) -------------------------------------------- The following instructions will create a cron job to run every monday at 02:30 (adjust the time to suit your needs): Edit the root user's crontab (sudo crontab -u root -e) Enter the following: SHELL=/bin/bash PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 30 2 * * 1 /usr/bin/curl -sSl https://raw.githubusercontent.com/mmotti/pihole-regex/master/install.py | /usr/bin/python3 Save changes Removing the manually created cron job If this script is the only thing you've added to the root user's crontab, you can run: sudo crontab -u root -r Otherwise, run: sudo crontab -u root -e and remove the three lines listed above in the install instructions.