3

Pihole is like an own DNS Server. So it must be possible to edit and add domains. I want to connect the domain my.domain with the ip my.own.ip.adress.

That means I enter my.domain to my browser and get redirected my.own.ip.adress.

How can I do this? Is there a DNS list or any file I can edit?

All this happens in my local network.

I tried using

sudo pihole -a hostrecord my.domain my.own.ip.adress

and

pihole restartdns

This works when I do (It shows my.own.ip.adress)

dig my.domain

But it's not accessable via browser. (I tried it from multiple devices and also cleared all browser caches, nothing changed)

My 01-pihole.conf file is this:

server=1.1.1.1
server=1.0.0.1
domain-needed
bogus-priv
host-record=my.domain,my.own.ip.adress
interface=eth0
server=/fritz.box/192.168.5.1
server=/5.168.192.in-addr.arpa/192.168.5.1
9
  • upvote for improving the question
    – jsotola
    Dec 28, 2019 at 1:37
  • my.domain have a web-server running ? If dig find the IP associated with your domain it's probably a problem on the web-server side. What is your response in your web-browser network tool when you call your domain , what is the HTTP error code , or other errors ?
    – Ephemeral
    Dec 28, 2019 at 11:10
  • @Ephemeral The Error in my browser is: Server not found. my.domain doesn't has a web-server running.
    – Jakob
    Dec 28, 2019 at 14:57
  • Ok. What are you trying to join as a service by putting the IP address or the domain name in the browser in this case ?
    – Ephemeral
    Dec 29, 2019 at 4:03
  • @Ephemeral I have a dlan device in my network. I can configure it by entering the local ip. But I want to enter a (self created) domain name.
    – Jakob
    Dec 29, 2019 at 5:07

1 Answer 1

1

Well, it's been a while. I believe PiHole has added a new function to officially support this.

Now, you can configure a "local DNS" on the PiHole admin panel. I'm running PiHole V5.12, FTL V5.17 and Web Interface V5.14.2. It's accessible on /admin/dns_records.php. Along the same lines, you can now access your PiHole admin pannel through pi.hole, thanks to this.

Just putting this here for anyone who may be asking the same question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.