Hostname for some clients show up in lowercase

I'm using Pi-hole's DHCP server and have configured a static IP for some of the clients:

XX:XX:XX:XX:XX:84,192.168.42.20,Tonis-MBP
XX:XX:XX:XX:XX:E2,192.168.42.21,Tonis-iPhone
XX:XX:XX:XX:XX:35,192.168.42.22,Tonis-iPad
XX:XX:XX:XX:XX:91,192.168.42.23,Tonis-Apple-TV

In the top permitted/blocked client list and the query logs, some of the hostnames show up in lowercase:

tonis-mbp.internal
tonis-ipad.internal
tonis-iphone.internal

While others have the hostname that I set in the static config:

Tonis-Apple-TV.internal

On my Fritzbox, they all show up with the "correct" name:

Tonis-Apple-TV
Tonis-MBP
Tonis-iPad
Tonis-iPhone

Why is that?

Domain Name System (DNS) names are "case insensitive". This document
explains exactly what that means and provides a clear specification
of the rules https://datatracker.ietf.org/doc/html/rfc4343

I know that they are case-insensitive. But that does not explain why only these 3 show up in lowercase and all the others in mixed case.

Do you, by any chance, have some screenshots for us? I went through the code (rather quickly TBH) and didn't see any places where we do a conversion to lower-case for client hostnames. But, yes, we definitely do this for domains so depending on if you see the hostname as a client descriptor or as a requested domain, differences in capitalization are actually expected.
Once we have more information, we can go and take a closer look again.

Are these enough.


Any updates on this? I'm having the same issue after upgrading to V6 and find it very annoying. Being able to see the case the way I enter it makes it much more readable and used to work fine in V5.

E.g: Bobs-MBP vs bobs-mbp, LivingRoomATV vs livingroomatv

1 Like

Still no updates?

I noticed the exaxt same thing.

My investigation:

  • All hostnames coming from my router as upstream DNS server for local hostnames are correctly shown as CaseSensitiveHostName.fritz.box for example
  • All hostnames defined in https://pi.hole/admin/settings/dnsrecords are presented as casesensitivehostname.fritz.box

That's true for

  • the Pi-Hole webinterface
  • using nslookup, see below (run directly on Pi-Hole server):
nslookup xxx.xxx.x.xx pi.hole
x.x.xxx.x.in-addr.arpa	name = casesensitivehostname.fritz.box.

nslookup xxx.xxx.x.xx fritz.box
x.x.xxx.xxx.in-addr.arpa	name = CaseSensitiveHostName.fritz.box.

And that even according to the settings the hostname is stored with upper case in the pihole.toml:

sudo cat /etc/pihole/pihole.toml | grep xxx.xxx.x.x
    "xxx.xxx.x.x CaseSensitiveHostName.fritz.box",

Summary:

  • Pi-Hole is the root cause
  • Pi-Hole seems to be "compliant" according to previous information in this topic - but at the end it is still confusing
  • I would prefer Pi-Hole would report hostnames exactly as defined. Not in plain lowercase only.

One GitHub issue on this timed out in May 2025:

But…
.
.
.
That’s not how the DNS protocol works ?!?! :flushed_face:

Have you ever typed in any url in your browser with both upper and lower case letters ?!
I am guessing you have not and you will never need to either… :wink:

2 Likes