# How do I show hostnames instead of IP addresses in the dashboard?

**URL:** <https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530>\
**Category:** FAQs\
**Created:** [June 5, 2017, 3:29am UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530 "2017-06-05T03:29:14Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [June 5, 2017, 3:29am UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/1 "2017-06-05T03:29:14Z")

</div>

There are **two ways** to accomplish this:

1. use _Pi-hole's_ built in DHCP server
2. use your _router's_ DHCP server and modify `/etc/hosts` on your Pi-hole machine

# Use Pi-hole's DHCP server

When you enable Pi-hole's DHCP server, you have the option to assign DHCP reservations and pair them with a hostname. Just make a reservation for every device on your network.

 ![](https://discourse.pi-hole.net/uploads/default/original/3X/4/0/40a9841839df672be57d1dd4e9147b7894a17dcb.png)

# Edit `/etc/hosts` on your Pi-hole

The other option is useful if you want to keep your existing DHCP server (usually your router) and just use Pi-hole for DNS.

All you need to do is edit the `/etc/hosts` file on your Pi-hole to add hostnames and IP addresses. These will then show up in the query log.

## `/etc/hosts` Network-wide

Normally, `/etc/hosts` applies only to the machine on which the file exists. But since Pi-hole is acting as a DNS server (resolving names into IP's) this file becomes available to any device using Pi-hole for DNS.

## DHCP Reservations

You should also note that if you do not use DHCP reservation from your router, if you assign a hostname to an IP and your router hands out that IP to a different device than you are expecting, the names may not be accurate.

## Privacy Settings

Please note that for _either_ option above, if you have the privacy mode enabled, the hostnames will **not** show in the dashboard.

 ![](https://discourse.pi-hole.net/uploads/default/original/3X/d/0/d0121ffea9d6276c7804f8777c8235ce5bb3c460.png)

---

<div class="post-metadata">

**Author:** ![ouquoi](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/o/d07c76/32.png) [@ouquoi](https://discourse.pi-hole.net/u/ouquoi)\
**Post date:** [June 6, 2017, 10:52am UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/2 "2017-06-06T10:52:03Z")

</div>

Thanks all for you answer It's clear.  
I was first thinking that the name in my (Not pihole ) DCHP server can be used now i understand why i have always Ip 😉

---

<div class="post-metadata">

**Author:** ![ouquoi](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/o/d07c76/32.png) [@ouquoi](https://discourse.pi-hole.net/u/ouquoi)\
**Post date:** [June 8, 2017, 12:56pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/3 "2017-06-08T12:56:34Z")

</div>

Just a quick remark :

Hosts file modification need a reboot to be taken into account (For newbie like me)

---

<div class="post-metadata">

**Author:** ![jacob.salmela](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/jacob.salmela/32/8_2.png) [@jacob.salmela](https://discourse.pi-hole.net/u/jacob.salmela)\
**Post date:** [June 9, 2017, 2:18am UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/4 "2017-06-09T02:18:17Z")

</div>

Good point. I think we could also probably just

```auto
pihole restartdns

```

but I'll have to check to make sure.

---

<div class="post-metadata">

**Author:** ![oldjamey](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/oldjamey/32/4186_2.png) [@oldjamey](https://discourse.pi-hole.net/u/oldjamey)\
**Post date:** [July 20, 2017, 3:56pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/5 "2017-07-20T15:56:16Z")

</div>

This is true. Thanks. FYI `pihole restartdns` does not resolve this. It does in fact require a reboot.

---

<div class="post-metadata">

**Author:** ![SteveDowling](https://discourse-cdn.pi-hole.net/user_avatar/discourse.pi-hole.net/stevedowling/32/4086_2.png) [@SteveDowling](https://discourse.pi-hole.net/u/SteveDowling)\
**Post date:** [June 23, 2018, 4:01am UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/6 "2018-06-23T04:01:00Z")

</div>

I know this is old but I didn't need to reboot, I just ran sudo service pihole-FTL restart. I had already restarted dnsmasq so not sure if that needs to be done first or not.

---

<div class="post-metadata">

**Author:** ![punkid](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/p/9e8a1a/32.png) [@punkid](https://discourse.pi-hole.net/u/punkid)\
**Post date:** [October 1, 2018, 9:29am UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/7 "2018-10-01T09:29:50Z")

</div>

I'm using Pihole 4.0 and i do not see host names anywhere. I'm running in net=host mode, using Pihole's DHCP server. In order to see hostnames instead of IP addresses i had to edit the hosts file.

Was using pihole 3.3 previously and the behavior was the same.

---

<div class="post-metadata">

**Author:** ![ripa](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/cc9497/32.png) [@ripa](https://discourse.pi-hole.net/u/ripa)\
**Post date:** [October 25, 2018, 9:22pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/8 "2018-10-25T21:22:19Z")

</div>

I never used pihole as dhcp and always got my hostnames in the dashboard. But since 4.0 its not working like before. You broke it.

And working with handmade hostslist cant be the solution..

I can ping every client in my network by the name from my windows client, which has the pihole as dns server. Looks for me like a bug, because the pihole definitly knows the hostnames of the internal ips.

---

<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:** [October 25, 2018, 9:41pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/9 "2018-10-25T21:41:29Z")

</div>

> [@ripa](#):
>
> But since 4.0 its not working like before

What are you seeing now? Screen shots would be helpful if you have them. And when did this behavior change - as soon as you updated to V4.0 or sometime later?

---

<div class="post-metadata">

**Author:** ![ripa](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/cc9497/32.png) [@ripa](https://discourse.pi-hole.net/u/ripa)\
**Post date:** [October 26, 2018, 5:20am UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/10 "2018-10-26T05:20:07Z")

</div>

Now I see the ips of the clients in the dashboard. I did a clean install with 4.0. Since this day i never saw any hostname of my clients in the dashboard. It worked the past 10 months before the update with different older versions.

Even with activated contitional forwarding, disabled "never forward non-FQDNs" and disabled "Never forward reverse lookups for private IP ranges" - no hostnames, only ips.

---

<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:** [October 27, 2018, 1:30am UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/11 "2018-10-27T01:30:27Z")

</div>

From a client other than Windows, can you dig local clients in your network?

---

<div class="post-metadata">

**Author:** ![ripa](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/cc9497/32.png) [@ripa](https://discourse.pi-hole.net/u/ripa)\
**Post date:** [October 27, 2018, 9:55am UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/12 "2018-10-27T09:55:27Z")

</div>

Yes, I can open the webinterface of my printer on my android device with its hostname.

---

<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:** [October 27, 2018, 2:52pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/13 "2018-10-27T14:52:19Z")

</div>

From the terminal on your Pi, run dig for the hostnames of both the Windows client and Android client and see if the IP is returned.

---

<div class="post-metadata">

**Author:** ![ripa](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/cc9497/32.png) [@ripa](https://discourse.pi-hole.net/u/ripa)\
**Post date:** [November 3, 2018, 4:46pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/14 "2018-11-03T16:46:00Z")

</div>

Nope, this is not working.

---

<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:** [November 3, 2018, 4:54pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/15 "2018-11-03T16:54:40Z")

</div>

What was the output of your commands?

---

<div class="post-metadata">

**Author:** ![ripa](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/r/cc9497/32.png) [@ripa](https://discourse.pi-hole.net/u/ripa)\
**Post date:** [November 3, 2018, 6:21pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/16 "2018-11-03T18:21:44Z")

</div>

root@DietPi:~# dig pc

```
; <<>> DiG 9.10.3-P4-Debian <<>> pc
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 4315
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;pc. IN A

;; AUTHORITY SECTION:
. 10800 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2018110300 1800 900 604800 86400

;; Query time: 19 msec
;; SERVER: 62.109.121.1#53(62.109.121.1)
;; WHEN: Sat Nov 03 18:19:04 GMT 2018
;; MSG SIZE rcvd: 106

```

---

<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:** [November 3, 2018, 11:32pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/17 "2018-11-03T23:32:12Z")

</div>

> [@ripa](#):
>
> the pihole definitly knows the hostnames of the internal ips.

This does not appear to be the case, based on the results of the dig for a local client. If you would like to upload a debug log and post the token, we can take a look at your setup.

Your best option at this point is either map the clients in the /etc/hosts file or use the Pi-Hole as DHCP server. Either of those two options will restore the client names to the logs and dashboard.

---

<div class="post-metadata">

**Author:** ![Himbeerkuchen](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/h/d9b06d/32.png) [@Himbeerkuchen](https://discourse.pi-hole.net/u/Himbeerkuchen)\
**Post date:** [November 24, 2018, 8:40pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/18 "2018-11-24T20:40:52Z")

</div>

Stupid question here: Editing the host file on the Pi worked fine as it now shows names instead of IP addresses in the Pi Hole interface. BUT I would like to see these names also in other programs running on my computer. Is that possible?

E. g. I use the iStat Pro widget in my Mac's dashboard and would like it to show the name instead of the IP address under the network setting.  
I was hoping that editing the host file on the Pi would do the trick but it doesn't seem so.  
What am I missing?

---

<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 3, 2019, 9:31pm UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/19 "2019-01-03T21:31:07Z")

</div>

3 posts were split to a new topic: [Cannot resolve host names](https://discourse.pi-hole.net/t/cannot-resolve-host-names/15772)

---

<div class="post-metadata">

**Author:** ![dev\_rath](https://discourse-cdn.pi-hole.net/letter_avatar_proxy/v4/letter/d/958977/32.png) [@dev\_rath](https://discourse.pi-hole.net/u/dev_rath)\
**Post date:** [January 13, 2019, 6:19am UTC](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530/20 "2019-01-13T06:19:16Z")

</div>

Here's a script that does exactly this - updates the hosts file with human-friendly hostnames, that the pihole uses in its reporting. There is no need to set the devices to have static IP address, or configure anything on the hosts themselves. This is a script that listens on the network for DHCP messages and updates the hosts file on the pihole server automatically. It does also try to profile to give the the hostname some additional context (like is it a TV, or fridge) but that's optional, and you can eliminate that part, if the basic hostname is enough.

[http://aquriousmind.com/pihole/](http://aquriousmind.com/pihole/)

I hope you find it useful.

[Next page](https://discourse.pi-hole.net/t/how-do-i-show-hostnames-instead-of-ip-addresses-in-the-dashboard/3530.md?page=2)
