Set own DNS enteries via web interface

I am using pi-hole for DNS and DHCP.
I have a few servers on the local network that are accessible via the Internet. So it's idiotic when I'm on the local network and using my FQDN to reach my own server via my external ip.
is it possible to add a webinterface where you can add own DNS entry?

Pi-hole is designed to filter DNS requests, not to answer an arbitrary IP address for specific entries.

However, what you are requesting can be easily achieved by existing OS features, just by editing a file:

  • for specific stationary devices on your local network:
    just add a corresponding entry to your hosts configuration file on that device. Different OSs will have that file in different locations (e.g. in Windows, that file is located in C:\Windows\System32\drivers\etc\hosts) .
    This is appropriate if you indeed only want to apply this solution to a specific stationary device. For a single stationary device, this might also prove the solution fastest to apply.
  • for all devices on your local network:
    just add a corresponding entry to /etc/hosts on your Pi-hole machine

The lines you add have to start with your local IP address, followed by the host names that you want to resolve to that IP address.
Assuming you are on a local network where your public server has been assigned with the fixed .32 IP, an entry could look like this:

A final word: Be aware that this only addresses DNS - whether your web server will actually handle requests from your local network is totally separate from Pi-hole and has to be sorted out within your web server’s configuration.

Implemented in v5.0 with "Local DNS Records".