UI feature: Show user number of unique blocked domains

First of all, a huge thank you for developer's effort and time to create and maintain Pihole! It's awesome!!

So far, Dashboard shows:

  • Total queries;
  • Number of queries blocked;
  • Percentage blocked; and
  • Domains on blocklist

I suggest to introduce another characteristic: The number and/or percentage of blocked domains that queries have been sent out to.

It looks like the tool has already been developed:

Maybe it can integrated in a graphical way.

Benefit to Pihole and their community: To actually see how few domains on blocklist are sufficient to efficiently block ad traffic.


Not sure we understood each other well here. My intention is to display the number of domains on the blocklist for which queries have actually been blocked. Or in other words, what domains on the blocklist have been requested by your network's clients.

Example: You have a gigantic blocklist of 5 million domains. However, in reality you need far less to effectively block ads and other unwanted stuff. Such tool you help to identify the domains need to be blocked (by identifying which ones have been requested by your client).

I think this is interesting, quantify the numbers and identify the relevant domains blocked.

(for more info, see here: Which adlists do you really need? Here is the answer (Script))

As far as I understood, the feature request is about the number of unique blocked domains. Let's say gravity contains 5 Million domains, 1 Million queries have been blocked, but only 1000 different (unique) domains (each 1000 times).

In the end one could say there is no need to have 5 Million domains in gravity, for this network 1000 domains would have been sufficient.

1 Like

You can do this with SQL commands to query the long term database:

All domains blocked in the past year (or the duration of your database)

sqlite3 /etc/pihole/pihole-FTL.db "select domain from queries where status in (1,4,5,9,10,11) group by domain order by domain"

All domains blocked in the same period from gravity only

sqlite3 /etc/pihole/pihole-FTL.db "select domain from queries where status in (1,9) group by domain order by domain"

That's it! :+1: