Domain being blocked but shown as not blocked in query


It depends. It would still be useful if you could run the grep command I suggested. I planned to explain what happens based on your response, but I can also explain the principles without this:

  1. Assume you query It is blocked by Pi-hole because it is in black.list. So far - so easy.
  2. Assume you query and your Pi-hole doesn’t know the answer. It forwards to your upstream destination. The upstream server replies with: is a CNAME.
    REPLY: - is
           - is
    This is then immediately forwarded to your client as it is a valid response of the query. It is not intended to process the return of your upstream server and validate it against the known blocked domains. This is not possible with dnsmasq and hence also not with pihole-FTL which is based on it.


8 posts were split to a new topic: CNAME, running two Pi-Holes together


By three files you mean regex/blacklist/gravity?

Regex works and also gravity that I can see in the webinterface when blocking other domains.

None of the domains in the blacklists are represented correctly in the webinterface when blocked.

I will test in each file separate later on the evening.


what should i do, remove it from my personal lists and block it only in blacklist ? And see what the results are in a day or so ? i am just testing :slight_smile:


A post was merged into an existing topic: CNAME, running two Pi-Holes together


Here are the three types of blocking:


A post was merged into an existing topic: CNAME, running two Pi-Holes together


How do the corresponding log lines (/var/log/pihole.log) look like?


how to explain ?


I can run the test again. I bet they won’t look any different than pihole.log entries I stated before.


Also on the latest dev version.

Added “” to the blacklist as an exact block, and it shows on the web GUI in the Exact blocking section… Ran “dig” for that domain from a connected client (NULL returned) and get this in the pihole.log.

Oct 12 11:26:00 dnsmasq[8277]: query[A] from
Oct 12 11:26:00 dnsmasq[8277]: /etc/pihole/regex.list is

The query log showed that the request was OK (cached):

Then, clear “” from the blacklist and add it back as a wildcard. Now it shows in the Regex & Wildcard blocking section as * (^|.)$.

Ran “dig” for that domain from a connected client (NULL returned) and get this in the pihole.log.

Oct 12 11:36:43 dnsmasq[8277]: query[A] from
Oct 12 11:36:43 dnsmasq[8277]: /etc/pihole/regex.list is

Query log shows this: original query at bottom, two digs at top. Request was blocked by regex/wildcard.


Thanks jfb for confirming. Looking at the first log lines are stating it came from the regex.list and I think it must have stated Null.


I didn’t see the (null) in the pihole.log, but I did get a NULL ( reply to the DNS query.


Then if you add as exact then how is it ending up in regex.list?


It isn’t in the regex list, but the query log is showing that it is.

 cat /etc/pihole/blacklist.txt


Lets hope it is resolved before 4.1 is released. :grinning:

Personally I think that has to that the blocked domain is moved into cache and there race condition between the request/answer and the cache when moving to log and database.


Eeeehm first will the regex be processed and if there is a match then processing stops.

So if you had it in the regex then it would explain the regex.list. More puzzling is then why black.list seem to be still being processed causing green cached line.

I will test if this is possible.

Tested it and regex.list is beating everyone in making the catch so no explanation for that earlier result.


The first time I ran this, the domain had not been in the regex list. It was only added to the black list at that point. Then subsequently removed from the black list and placed in regex.


I agree that something is definitely fishy here. I only recently moved to a new flat and still have no Internet here (I’m only on a rather limited mobile data plan with 1GB per month) so my coding/debugging capabilities are really limited at the moment. Unfortunately, construction work is going on here and it’s totally unforeseeable when I can get proper connectivity :confused: .

We can surely block the release of 4.1 until we have confirmed/resolved the reported problems. I see two issues here:

  1. The shown status in the Query Log is wrong (and hence the color)
  2. @jfb is getting shown that the domain was cached on the Query Log, that it was regex blocked in the pihole.log file although the domain is actually exact (blacklist blocked). This is much more severe in my eyes and a counter that is off by one or something similar may explain this as well as the other issue.

As soon as I can get a mobile data uplink that is stable enough to try to reproduce this on my Pi-hole, a fix shouldn’t take long. It is important for me that pihole-FTL is bug free. I may be able go somewhere tomorrow (e.g. to a coffee shop) for stable Internet, let’s see how I can arrange things.


It is only cosmetical so I have a relaxed position on it.

The functionality is not impeded as far as I can see.

Goodluck with your new flat and getting hooked up to the Internet.