How to add whitelists

Please follow the below template, it will help us to help you!

Expected Behaviour:

I add a whitelist.txt in the bear on the page "Whitelist" and it works like the blocklists.

Actual Behaviour:

I can only add a single domain in this section. Ive found another thread where someone wrote you had to edit the whitelist.txt file via command. Unfortunately this command with /etc/pihole/... isnt working. I need to access the pihole menu first right? Im totally new in the raspberry universe and this is my first project so I dont know how to to these command things.

Debug Token:

https://tricorder.pi-hole.net/kdg1qnsatd

If you want to directly edit the whitelist file, you can do so, but you have to manually rebuild gravity afterwords. If you add whitelist entries from the web GUI, then gravity is rebuilt automatically.

sudo nano /etc/pihole/whitelist.txt

Make your desired changes, save and exit.

pihole -g

Okay, but in the GUI I cant add a whitelist.txt only single domains, right?

Correct. If you want to batch add, the best way is to directly edit the whitelist file and then rebuild gravity.

I use PuTTY as SSH client to connect with my pi. Copy paste isnt working with Ctrl+C and Ctrl+V. Is it possible to copy commands?

So I entered the link to the whitelist in the whitelist file (manually because copy&paste didnt work) but I think just the link to the list is whitelisted and not the links from it. Maybe its because I didnt understand the commands on the bottom like ^X for exit if I do so nothing happens so I just quit the session. Its kinda difficult to deal with^^

My new token: https://tricorder.pi-hole.net/memrbwie0m

You will need to sort out your editing commands and clean up the file:

-rw-r--r-- 1 root root 265 Feb  3 09:22 /etc/pihole/whitelist.txt
   android.clients.google.com
   clients1-6.google.com
   clients1.google.com
   cdnjs.cloudflare.com
   raw.githubusercontent.com
   https://raw.githubusercontent.com/raghavdua1995/DNSlock-PiHole-whitelist/master/whitelist.list
   ^x
   ^X
   X
   °X
   ^X
   deezer.com
   encrypted-tbn0.gstatic.com

I did what you said and cleaned up the file. But the link to the whitelist is a whitelisted domain itself and does not contain the links in it or does it?

https://tricorder.pi-hole.net/mq2xxypjyu

This is an incorrect whitelist entry. The whitelist is for single domains only:

https://raw.githubusercontent.com/raghavdua1995/DNSlock-PiHole-whitelist/master/whitelist.list

Yeah I know but how do I add a whitelist.txt though? Like said I edited the whitelist.txt file and entered the link to it. I want to whitelist all the links from the whitelist.txt in my file. So how do I do that? Im a little bit confused.

Open that web page and copy all the lines to your clipboard. Then manual edit /etc/pihole/whitelist.txt and paste them in. Save and exit and then rebuild gravity.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.