There are plenty tutorials how to set up the pi-hole as a DNS server. But I cant find any how to do the reverse.

I set up a pi hole as a DNS server and configured in my router to sent all traffic through it. Now I have troubles with mi pi-hole and I want to set the DNS back to my router.

I am pretty new to networking and I have the fear to screw up my entire network doing something wrong. What are the step to do, where I need to have attention, how to figure out what ip adress I need to write in router?

  • sudo nano /etc/resolv.conf you can temporarily replace the pihole nameserver stuff with your router address.
    – Dougie
    Jan 15, 2021 at 21:05

1 Answer 1


If you want to go back to the previous settings, you'll have to restore the router settings that you have changed. Somewhere in your router there should be an option to set the DNS servers, you will have to find that. In my router, I have set the DNS server addresses to my two Raspberry Pi Zero's with PiHole on it. If I don't want that anymore, I set the DNS option in my router back to the recommended option:

enter image description here

Besides that, it is best practice to have at least two DNS servers in your network for failover. If you have one DNS server and it breaks, your whole network breaks. And if you're unlucky, Raspberry Pi's running from an SD card tend to break a few times a year ...

  • Is it possible to config my router as the alternative ? Jan 15, 2021 at 18:37
  • No, because your router isn't a DNS server. It just points clients to the right place. Somewhere on your network there is a DHCP server, probably on your router (if you didn't change that also). The DHCP servers assigns IP's to clients AND tells them where to find a DNS server (unless you change that manually on a client). That will be either your own DNS servers or the DNS servers assigned by your internet provider.
    – Joep
    Jan 16, 2021 at 12:41

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.