Pi-Hole DNS Server should be case INsensitive, but it isn't!

Greetings,

by testing my DNS server(s) utilizing DNS Benchmark I figured that the Pi-Hole would block the wildcard-blocked apple.com, all lower case, but it would NOT block Apple.com, starting with upper case!

As far as I understand the definition of the domain name system it should totally be case insensitive:

Note that while upper and lower case letters are allowed in domain
names, no significance is attached to the case. That is, two names with
the same spelling but different case are to be treated as if identical.

Source: https://tools.ietf.org/html/rfc1035#section-2.3.1

Typing "Apple.com" in Chrome's Omnibox would result in Chrome (like all browsers) automatically querying the lower case "apple.com", receiving the IP of the Pi-Hole because the domain is blocked.

DNS Benchmark on the other hand queries "Apple.com" and a bunch of other popular domains ALL starting with a capital letter. In the query log it shows up as "OK" instead as "Pi-holed".

Can anyone reproduce this behavior?
Is this intended behavior or a bug? Maybe because of Linux' case sensitivity?!

Might be interesting to know if one could bypass domain blocking with this method...

I tried to reproduce this and confirmed that the Pi-hole DNS server is indeed case insensitive. In your case, the query log page gives a wrong positive although the domain actually got blocked.

We will fix this, thanks for reporting!

1 Like

I also moved this thread as this is not really a feature request.

Thanks for this incredible fast response, I appreciate your great work! :+1:

Indeed, the log (pihole -t) showed the domains were blocked.