pi-hole – Whitelisting Domains

Pi-hole is awesome, but sometimes it works too well.  For instance, my wife wants to watch the recipe videos on the Food Network site, and because of embedded ad content they get pi-holed.  Here’s how to whitelist domains:

First, you know that your pi-hole has a web interface, yes?  Point a browser to http://[thepiholeIPaddress]/admin/index.php to get to it.  From there you can check out the query log, which you’re gonna need.  If you find the log all full up and cumbersome, you can empty it.  Hop on your pi and, in a Terminal session, run:

1
sudo truncate /var/log/pihole.log --size 0

This will zero out the query log file.  Now use your browser to hit the site containing the data you want whitelisted.  You’re going to want to make sure that traffic other than your own is at a minimum while you do this, or you’re going to be seeing a lot of information in the log that isn’t applicable to the browsing you are doing.  Anyway, these days sites pull from a variety of domains, so you can’t just assume whitelisting the domain of the url will be sufficient.  For example, to get videos to work on the Food Network site I had to whitelist assets.adobetm.com.

Once the page has finished loading check the query log.  In it you’ll see both allowed domains and those that have been pi-holed.  Make a list of the holed domains; you’re going to have to add them your whitelist individually and then test to find the one you’re after.  To add a domain to the whitelist, open the whitelist (again in Terminal) in nano:

1
sudo nano /etc/pihole/whitelist.txt

Use your arrow keys to navigate to the bottom of the whitelist and then add your domain.  At this time, wildcards are not supported in this list.  Once you’ve added the domain, save the whitelist via ctrl+o.  Then open a second Terminal session and reload your pi-hole’s settings by executing the following:

1
/usr/local/bin/gravity.sh

Once reloading has completed refresh the page containing the data you’re trying to whitelist.  If you’ve achieved success, close your Terminal sessions (you can exit out of nano with ctrl+x) and call it a day.  If not, remove from the whitelist the domain you just added and move on to the next holed domain in your list.  Rinse and repeat until you see what you’re looking for.

Some people seem to like using the Whitelist Assistant Chrome extension when doing this.  I find pi-hole’s query log to be absolutely sufficient.

 

 

One comment

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">