Pi-Hole setting dns to itself but not working


Please follow the below template, it will help us to help you!

Expected Behaviour:

Not setting the default dns server in raspbian to itself but if it does make it work.

Actual Behaviour:

It repleces the dns that i set in resolv.conf with (localhost) and i don’t know how to stop that

Debug Token:

Should i put the hole log thing here?

Can someone help me with setting my own dns because if it is setting the dns to i can’t do any dns requests, i have to manually set it to (my router) i think every 2-5 hours



After you generate the debug log and upload it when asked, you will receive an alphanumeric character string (token). Post that token here and we will be able to find your log on the server.



That completly normal behavior and the address in resolv.conf should be and only the IPaddress of the router when installing or updating Pi-hole is not working.

What have you selected in Pi-hole as DNS upstream server.

Please upload your debug log and post your token as jbf requested.



The debug token is
and my DNS settings are google for ipv4 and cloudflare for ipv6



Setting the loopback address in /etc/resolv.conf makes it so the Pi uses Pi-Hole as its DNS service. This is the normal and expected configuration. If you are having Pi-Hole issues with failure to respond to DNS queries, this indicates a Pi-Hole problem that you are bypassing by changing /etc/resolv.conf.

Your debug log shows that Pi-Hole is working, at least at the time when you generated the log.

*** [ DIAGNOSING ]: Name resolution (IPv4) using a random blocked domain and a known ad-serving domain
[✓] a.collective-media.net.49481.9362.302br.net is via localhost (
[✓] a.collective-media.net.49481.9362.302br.net is via Pi-hole (
[✓] doubleclick.com is via a remote, public DNS server (

When Pi-Hole fails to respond and you change /etc/resolv.conf to your router IP, how is the IP in that file being set back to the loopback address? Are you doing that manually, restarting Pi-Hole, etc.?



I am not restarting pi-hole but maybe DietPi does that



Is this the distribution of Pi-Hole that is installed by DietPi or did you install Pi-Hole yourself using the curl command?

What changes have you made to your local installation? Your debug log shows that the installed Web version does not match the Git version.

*** [ DIAGNOSING ]: Web version
[i] Web: v4.1.1 (https://discourse.pi-hole.net/t/how-do-i-update-pi-hole/249)
[i] Branch: master
[i] Commit: v4.1.1-0-gde7aa5a-dirty


I first installed it via dietpi-software but it didn’t work, so i did it via the curl command



Given that your install does not appear to be clean, i would save your custom settings with teleporter, do a complete removal of Pi-Hole with pihole uninstall, then do a fresh install of Pi-Hole.



Thanks that worked!


closed #11

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.