# Custom DNS - Observations

**URL:** <https://discourse.pi-hole.net/t/custom-dns-observations/27533>\
**Category:** Beta 5.0\
**Created:** [January 27, 2020, 3:51pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533 "2020-01-27T15:51:47Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![borpin](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/borpin/32/2648_2.png) [@borpin](https://discourse.pi-hole.net/u/borpin)\
**Post date:** [January 27, 2020, 3:51pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/1 "2020-01-27T15:51:47Z")

</div>

Couple of observations on Custom DNS facility and a couple of questions.

The name **Custom DNS** is not the best I suggest. Perhaps **Local Hostnames** might be better (possibly need to put my tin hat on 😁)? Any entry in `/etc/hosts` is going to be a local hostname, is it not? You could argue that Pi-hole itself is a custom DNS 😉.

Pulling in the current content of `/ect/hosts` for a user to see might be useful. What will happen if a hostname is duplicated? Should this be avoided at all costs?

Perhaps add a comment in `hosts` file, to not add entries but to use the internal facility?

How does this facility interact / impact with the advanced DNS settings? I am thinking of -

- Never forward non-FQDNs (currently checked)
- Never forward reverse lookups for private IP ranges (currently checked)
- Use Conditional Forwarding (currently un-checked)

I'll admit I have never been completely comfortable that I understand what these settings actually do.

I currently have a number of static IP entries in my `/etc/hosts` that are subdomains of a registered domain that I only use internally (SSL Certs issued by DNS), but this is different to the domain specified in the DHCP server (`.local`).

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [January 27, 2020, 4:38pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/2 "2020-01-27T16:38:43Z")

</div>

I'll try to answer as many possible.

> [@borpin](#):
>
> The name **Custom DNS** is not the best I suggest. Perhaps **Local Hostnames** might be better (possibly need to put my tin hat on 😁)?

If you mean below settings:

 ![image](https://discourse.pi-hole.net/uploads/default/original/2X/6/6352d84fb98370a66b809c8fe7d7142e7f0c1189.png)

Yes its an accurate description.  
You configure DNS servers here that Pi-hole itself will query if it doesnt know the answer (not on the blocklists or not cached).

> [@borpin](#):
>
> Any entry in `/etc/hosts` is going to be a local hostname, is it not?

Not exactly.  
Pi-hole reads this `hosts` file on startup/boot and creates local internal DNS A or AAAA records out of these `hosts` entries.  
You could also configure `pihole-FTL` (`dnsmasq`) to not read this `hosts` file at startup:

```auto
pi@noads:~ $ man dnsmasq
[..]
       -h, --no-hosts
              Don't read the hostnames in /etc/hosts.

```

> [@borpin](#):
>
> You could argue that Pi-hole itself is a custom DNS 😉.

Pihole **is** a caching forwarding DNS server:

> **[Pi-hole Origins - Pi-hole documentation](https://docs.pi-hole.net/main/origins/)**
>
> Software packages used in Pi-hole

> [@borpin](#):
>
> Perhaps add a comment in `hosts` file, to not add entries but to use the internal facility?

The `hosts` file is not really suited to create DNS records as it will only allow you to add A or AAAA records.  
Scroll down half way in below posting of mine "If you create a file":

> [@Running two Piholes?](https://discourse.pi-hole.net/t/running-two-piholes/3895/6):
>
> I wonder if you have same issue as i experienced with Asus. If using the router for DHCP, can you post results from below on a Linux client please: cat /etc/resolv.conf Or if on a Windows client: ipconfig /all \*For latter, I am only interested in the DNS server(s) displayed. I dont have details, you'll need to figure out yourself as probably no one tried before. Its Linux so almost everything you can think of is possible if using right software and bit of scripting. One solution I can t…

> [@borpin](#):
>
> How does this facility interact / impact with the advanced DNS settings? I am thinking of -
> 
> - Never forward non-FQDNs (currently checked)
> - Never forward reverse lookups for private IP ranges (currently checked)
> - Use Conditional Forwarding (currently un-checked)
> 
> I’ll admit I have never been completely comfortable that I understand what these settings actually do.

The docs are the best source for that:

> **[Overview of Pi-hole - Pi-hole documentation](https://docs.pi-hole.net)**
>
> Brief overview of Pi-hole

---

<div class="post-metadata">

**Author:** ![Bucking\_Horn](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/bucking_horn/32/18719_2.png) [@Bucking\_Horn](https://discourse.pi-hole.net/u/Bucking_Horn)\
**Post date:** [January 27, 2020, 6:26pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/3 "2020-01-27T18:26:58Z")

</div>

> [@deHakkelaar](#):
>
> If you mean below settings:

As he categorised this topic as Beta 5, I think @borpin is referring to the [Beta 5.0 Custom DNS](https://github.com/pi-hole/AdminLTE/pull/1099) feature.

I would concur that _Custom DNS_ -as a name- can be improved on.  
However, to me, _Local Hostnames_ doesn't quite hit the spot either, as that feature might be used to trap _public hostnames_ and redirect them to a local resource as well (as it is, I currently do that in v4 myself -by appending to `/etc/hosts`- in order to mock various connectivity checks).

What do you think of _Custom Host Records_, maybe?

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [January 27, 2020, 6:28pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/4 "2020-01-27T18:28:08Z")

</div>

> [@Bucking\_Horn](#):
>
> As he categorised this topic as Beta 5, I think @borpin is referring to the [Beta 5.0 Custom DNS](https://github.com/pi-hole/AdminLTE/pull/1099) feature.

Dont have yet 😉

---

<div class="post-metadata">

**Author:** ![borpin](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/borpin/32/2648_2.png) [@borpin](https://discourse.pi-hole.net/u/borpin)\
**Post date:** [January 27, 2020, 7:00pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/5 "2020-01-27T19:00:41Z")

</div>

> [@deHakkelaar](#):
>
> If you mean below settings:

No sorry, I meant this

 ![image](https://discourse.pi-hole.net/uploads/default/original/2X/f/f5cde85deadb9b319776072544ff65effaac7b39.png)

> [@Bucking\_Horn](#):
>
> As he categorised this topic as Beta 5, I think @borpin is referring to the [Beta 5.0 Custom DNS](https://github.com/pi-hole/AdminLTE/pull/1099) feature.

Yes

> [@Bucking\_Horn](#):
>
> What do you think of _Custom Host Records_ , maybe?

I could live with that.

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [January 27, 2020, 7:14pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/7 "2020-01-27T19:14:42Z")

</div>

This feature was an external contribution which we might have checked more for proper function than for wording. Any suggestions for improvement are welcomed. You can either open a PR and discuss in there or discuss here we we'll make sure to commit the changes once there is agreement reached.

---

<div class="post-metadata">

**Author:** ![borpin](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/borpin/32/2648_2.png) [@borpin](https://discourse.pi-hole.net/u/borpin)\
**Post date:** [January 27, 2020, 7:20pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/8 "2020-01-27T19:20:46Z")

</div>

It is a really useful feature, just needs a bit of expanding to explain it.

I think the name suggestion from @Bucking_Horn is a good one although I might go for _Local Host Records_.

---

<div class="post-metadata">

**Author:** ![jfb](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jfb/32/4332_2.png) [@jfb](https://discourse.pi-hole.net/u/jfb)\
**Post date:** [January 27, 2020, 7:38pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/9 "2020-01-27T19:38:15Z")

</div>

Or we could follow the Monty Python approach and name it "the section until recently known as 'Custom DNS'" 😀

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [January 27, 2020, 7:44pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/10 "2020-01-27T19:44:42Z")

</div>

Did I hear you say "Ni" ?  
RIP Terry.

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [January 27, 2020, 8:44pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/11 "2020-01-27T20:44:01Z")

</div>

Just to note, the person responsible for that section has been sacked.

---

<div class="post-metadata">

**Author:** ![deHakkelaar](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dehakkelaar/32/674_2.png) [@deHakkelaar](https://discourse.pi-hole.net/u/deHakkelaar)\
**Post date:** [January 27, 2020, 9:14pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/12 "2020-01-27T21:14:27Z")

</div>

Have you sacked the persons responsible for the sacking as well ?  
Team team team!

[![](https://discourse.pi-hole.net/uploads/default/original/3X/0/5/059536dca9120540a92a469c75487eaf49e8bbff.jpeg "The IT Crowd - Team") ](https://www.youtube.com/watch?v=EoMW8VYb_GE)

---

<div class="post-metadata">

**Author:** ![aleks-83](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/9de0a6/32.png) [@aleks-83](https://discourse.pi-hole.net/u/aleks-83)\
**Post date:** [April 28, 2020, 7:39am UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/14 "2020-04-28T07:39:16Z")

</div>

Instead of suggesting any other new wording for the feature, i would like to know a bit more about the functionality itself.  
(I can't find any mentioning of this feature in the [documentation](https://deploy-preview-201--pihole-docs.netlify.app/).)

Recently I edited my /ect/hosts file to see hostnames instead ob IP addresses in the PiHole WebIF.

With the "_Custom Host Records_" or "_Custom DNS_" feature i can realize the same?

The existing content of the hosts file is not yet loaded into this table.  
So maybe i have to start over wit the naming.  
Wouldn't be a problem for me, if i am on the right track now with the functionality.

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [April 28, 2020, 8:07am UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/15 "2020-04-28T08:07:10Z")

</div>

> [@aleks-83](#):
>
> With the “ _Custom Host Records_ ” or “ _Custom DNS_ ” feature i can realize the same?

Yes you can 🙂

> [@aleks-83](#):
>
> The existing content of the hosts file is not yet loaded into this table.  
> So maybe i have to start over wit the naming.

You can ~~copy&pasting~~ transfer into `/etc/pihole/custom.list`

---

<div class="post-metadata">

**Author:** ![aleks-83](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/a/9de0a6/32.png) [@aleks-83](https://discourse.pi-hole.net/u/aleks-83)\
**Post date:** [April 28, 2020, 9:02am UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/16 "2020-04-28T09:02:35Z")

</div>

OK, thanks.

It's working

---

<div class="post-metadata">

**Author:** ![cmgeek](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/cmgeek/32/12608_2.png) [@cmgeek](https://discourse.pi-hole.net/u/cmgeek)\
**Post date:** [April 28, 2020, 10:31am UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/17 "2020-04-28T10:31:57Z")

</div>

Love this new feature/functionality adding all my devices under .lan - smooth!

As for the name....I figured it out so "Custom" is OK, possibly "User DNS config", "Local DNS config" or "DNS Override" (assuming this functionality takes priority?)

 ![pihole-custom](https://discourse.pi-hole.net/uploads/default/original/2X/4/479fad12f6442fcb2ec715f5dcd50eadd358259c.png)

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [April 28, 2020, 5:07pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/18 "2020-04-28T17:07:22Z")

</div>

> [@cmgeek](#):
>
> or “DNS Override” (assuming this functionality takes priority?)

No, the priority is:

1. Configured in a config file in `/etc/dnsmasq.d/`
2. Read from `/etc/hosts`
3. Read from the list containing the device's host name and `pi.hole` (stored in `/etc/pihole/local.list`)
4. Read from the "custom DNS" list (stored in `/etc/pihole/custom.list`)

Only the first record will trigger an address-to-name association.

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [April 28, 2020, 5:21pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/19 "2020-04-28T17:21:29Z")

</div>

So how about this? I'd prefer to get this done soon so we can still put it into v5.0. I would really really like to see the release not getting delayed any further. However, for this, we need to absolutely freeze the code so we can do some final testing.

 ![Screenshot_2020-04-28 Pi-hole Admin Console](https://discourse.pi-hole.net/uploads/default/original/2X/e/e50e2970488374aa589b19ffb0549b60059e29d8.png)

---

<div class="post-metadata">

**Author:** ![yubiuser](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/yubiuser/32/12100_2.png) [@yubiuser](https://discourse.pi-hole.net/u/yubiuser)\
**Post date:** [April 28, 2020, 5:41pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/20 "2020-04-28T17:41:50Z")

</div>

I think it's to close to /etc/hosts. Users likely will not understand the difference between this page and /etc/hosts and wonder if (or why not) this page edits /etc/hosts directly.

I think "Custom DNS configuration" or "Local DNS config" is better

---

<div class="post-metadata">

**Author:** ![DanSchaper](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/danschaper/32/91_2.png) [@DanSchaper](https://discourse.pi-hole.net/u/DanSchaper)\
**Post date:** [April 28, 2020, 5:53pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/21 "2020-04-28T17:53:14Z")

</div>

"On this page you can add domain/IP associations." Drop off the reference to `/etc/hosts`.

Edit: And change "List of Custom DNS domains" to "List of Local DNS records."

---

<div class="post-metadata">

**Author:** ![DL6ER](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/dl6er/32/281_2.png) [@DL6ER](https://discourse.pi-hole.net/u/DL6ER)\
**Post date:** [April 28, 2020, 5:59pm UTC](https://discourse.pi-hole.net/t/custom-dns-observations/27533/23 "2020-04-28T17:59:58Z")

</div>

![Screenshot_2020-04-28 Pi-hole Admin Console(1)](https://discourse.pi-hole.net/uploads/default/original/2X/7/7227f18ebb731b1f8d0145f6721a71c2b0251134.png)

[Next page](https://discourse.pi-hole.net/t/custom-dns-observations/27533.md?page=2)
