Please update this FAQ entry and mention as another alternative to use the conditional forwarding setting.
I found this FAQ and thought that's it's only option to manage the issue via /etc/hosts or to use the PiHole DNS. Fortunately somebody pointed out I instead can use the DNS of my router when I configure conditional forwarding
It depends on what kind of network driver you are using.
For macvlan (assuming you are using docker containers) it should be the same as for a physical host because pihole will have an IP in your local network. However from the pihole container there should be a route to the routers IP.
I think the conditional forwarding option should also work if the pihole is in a different subnet as you need to define the local subnet, domain and you router (DHCP server) IP.
What could be a problem is if you don't have a working route from the pihole container to the DHCP server IP (which is not trivial in case of macvlan for example).
I also wish there was an easier way to do this, editing /etc/hosts every time is going to get tiresome quickly, not to mention remembering to delete the entries too.. Brutal.. I am using OPNsense for the DHCP already
I have also setup conditional forwarding as recommended, but still no hostnames were shown.
Then I noticed my modem showing up in the dashboard of pihole as upstream server, it seemed pihole did forward some requests. So I have checked the log of queries sent to my modem (just clicking on the name/ip):
Type Domain Client Status Reply
PTR 1.0.168.192.in-addr.arpa 192.168.0.120 OK (answered by getmodem.home#53) DOMAIN (3.0ms)
PTR 136.0.168.192.in-addr.arpa 192.168.0.108 OK (answered by getmodem.home#53) NXDOMAIN (16.3ms)
PTR 132.0.168.192.in-addr.arpa 192.168.0.108 OK (answered by getmodem.home#53) NXDOMAIN (17.2ms)
PTR 131.0.168.192.in-addr.arpa 192.168.0.108 OK (answered by getmodem.home#53) NXDOMAIN (18.8ms)
PTR 128.0.168.192.in-addr.arpa 192.168.0.108 OK (answered by getmodem.home#53) NXDOMAIN (19.7ms)
PTR 121.0.168.192.in-addr.arpa 192.168.0.108 OK (answered by getmodem.home#53) NXDOMAIN (20.4ms)
PTR 115.0.168.192.in-addr.arpa 192.168.0.108 OK (answered by getmodem.home#53) NXDOMAIN (21.9ms)
As you can see from the log the modem only resolves it's own IP with reverse look-up, but not the other hosts. The same can be verified using dig e.g.: dig -x 192.168.0.121 @192.168.0.1
So also check reverse look-ups with your modems/DHCP servers before blaming only pihole..