To learn how to set up a second DNS server at home, build one resolver properly, mirror it onto a second always-on device, then list both addresses in your router so devices can fail over on their own. The whole job takes about an hour, and most of that time goes into the first server. The second one is mostly a copy.
One DNS server is a single point of failure. When it reboots or stops answering, devices still show Wi-Fi, yet no site will load. A backup resolver removes that weak spot, so updates and hardware faults stop being household emergencies.
Why One DNS Server Is Not Enough
DNS translates site names into addresses your network can use. When it stops, the router stays reachable and Wi-Fi looks normal, but pages refuse to load. Our guide to what DNS is and how it works explains that translation step.
With one resolver, such as a single Pi-hole, every device depends on that one box. A second server breaks that chain.
What a second server actually buys you
- Updates without downtime. You can update or restart one server while the other keeps answering queries. There is no need to schedule Pi-hole updates for 2 AM or warn the house first.
- Room for hardware to fail. SD cards wear out, and that is the most common way a Raspberry Pi DNS server dies. With a backup in place, the network keeps working while you rebuild the failed device.
- Shared load and separate caches. Two servers split the query load between them. Each one caches answers on its own, which can make repeat lookups a little faster.
- The same pattern professional networks use. Real networks run at least two DNS servers as a matter of course. A home setup built the same way gets the same resilience.

What You Need Before You Start
The shopping list is short. You may already own everything required.
Two devices that stay on
You need two always-on devices. Two Raspberry Pis, any model 3 or newer, are the classic pairing. Mixed hardware works too: a Pi with an old laptop, a mini PC, a NAS running containers, or a virtual machine on an existing home server. Both devices must stay powered on and reachable on your local network.
Fixed addresses for both servers
Each server needs a static IP address. A typical layout uses 192.168.1.2 for the primary and 192.168.1.3 for the secondary. Set these as DHCP reservations in your router so the addresses never drift and quietly break failover.
One software choice, installed twice
Pick one DNS package and run it on both devices: Pi-hole, AdGuard Home, Technitium, or plain Unbound or Bind. AdGuard Home is friendliest for beginners. Pi-hole has the largest community. Either works well as a mirrored pair.
About an hour of your time
Budget roughly an hour in total. The first server takes most of it, because that is where you choose upstreams, blocklists, and local entries. Cloning that finished setup onto the second device is the fast part.
Step 1: Build the Primary DNS Server
Treat the first server as the reference build. Everything on the secondary will copy it, so it is worth getting this one right before you duplicate anything.
- Install the operating system and DNS software. Flash Raspberry Pi OS, or your preferred Linux, onto the first device. Then install your chosen DNS package. With AdGuard Home, you download the release and open the setup wizard at the device’s IP address on port 3000.
- Confirm the static IP. Check that the device holds 192.168.1.2, the address you reserved for the primary. Do this before you configure anything else, so you are building on the right address.
- Set the upstream resolvers. Point the server at a private upstream provider such as Cloudflare at 1.1.1.1 or Quad9 at 9.9.9.9. If your software supports DNS-over-HTTPS or DNS-over-TLS, turn that encryption on here.
- Add blocklists and local entries. Load the blocklists you want for ad blocking. Then add any local DNS rewrites, for example pointing nas.home at your NAS so you can reach it by name.
- Test with only this server active. Point one device at the new server and browse normally. Confirm pages load, blocked domains stay blocked, and your local names resolve before you move on.
Both servers will share your upstream choice. Our guide on how to find the best DNS server for your home can help you decide.
Step 2: Mirror the Setup on the Secondary Server
The secondary has one job: behave exactly like the primary. When failover happens, nobody in the house should notice any difference in speed, blocking, or local names. Copying the configuration gets you there faster than rebuilding by hand.
- Install the same software, same version. Put the identical package on the second device. Matching versions avoids small behaviour differences that are hard to spot later.
- Copy the configuration across. AdGuard Home keeps its settings in AdGuardHome.yaml, which you can copy to the second device. Pi-hole moves settings through its Teleporter export. After copying, adjust only the device-specific details, mainly the IP address.
- Match the upstreams and blocklists. The secondary should query the same upstream providers and enforce the same blocking rules. That way the browsing experience is identical no matter which server answers.
- Sync your local DNS entries. Any custom hostname on the primary, such as nas.home, must exist on the secondary too. A short checklist or a shared notes file keeps these entries aligned over time.

A backup DNS server you never test is just a decoration. Fail over to it on purpose, once a month, and confirm the house stays online.
A mirror that drifts out of date may answer with old blocklists or missing local names. Keeping the copy honest is the ongoing work.
Step 3: Point Your Router at Both Servers
With two working resolvers ready, tell the network to use them. This is a single change in your router settings, and it is what makes failover automatic for every device at once.
- Open the router admin page. The address is usually 192.168.1.1. Look for DNS settings under the Internet, WAN, or DHCP section. It sits in the same area where you would set a custom DNS provider.
- Enter both server addresses. Put 192.168.1.2 in the Primary DNS field and 192.168.1.3 in the Secondary DNS field. Save the change and let the router apply it.
- Renew the DHCP leases. Devices pick up the new pair of addresses when their leases renew. Toggle Wi-Fi off and on to force it, or reboot the router to push the change everywhere at once.
From here, client behaviour is automatic. Most devices query the primary first and fall back to the secondary when it does not answer quickly. Some devices alternate between the two instead. Either pattern gives you the same result: one server can be down without users noticing.
Configuring DNS once in the router protects every phone, laptop, and TV at once. See our explainer on what changing your DNS actually does for the wider effect.
Step 4: Test the Failover Before You Trust It
An untested backup is a hope, not a plan. Before you rely on this setup, prove that the secondary really takes over when the primary disappears. The test takes a few minutes and settles the question completely.
- Take the primary offline. Unplug its power or network cable. Then browse the web from a phone and a laptop. Pages should load as normal, with no visible delay or errors.
- Check the secondary query log. Open the DNS dashboard on the secondary and look for fresh queries arriving. If the log stays empty, clients are not failing over, and the router DNS settings need another look.
- Bring the primary back and repeat in reverse. Reconnect it and confirm it resumes answering queries. The secondary should settle back into its standby role.
- Put a monthly check on the calendar. A recurring reminder keeps the test from being forgotten. Configuration drift, such as a blocklist updated on one server only, is the quiet way redundancy fails.

The query log is your proof. Fresh entries on the secondary while the primary is unplugged mean failover works. No entries means something in the chain needs fixing.
Keeping Both Servers in Sync
Running two DNS servers asks for a little ongoing care. None of it is difficult, but skipping it lets the pair drift apart. A few steady habits keep them identical.
Update the secondary first
When a new Pi-hole or AdGuard Home release appears, update both servers on the same day. Start with the secondary, confirm names still resolve, then update the primary. If the update causes trouble, the untouched server still carries the house.
Keep configuration exports as backups
Both Pi-hole and AdGuard Home can export their full configuration, through Teleporter or the settings file. Keep a recent export somewhere safe. It rebuilds a failed device in minutes and serves as your disaster-recovery plan.
Automate the sync if you like
Manual sync after each change is fine for most homes. A scheduled rsync job can copy configuration files between the pair, and Pi-hole users have Gravity Sync, built for keeping Pi-hole pairs matched. If you rarely change settings, simply make every change on both servers in the same sitting.
Monitor both servers
A free tool such as Uptime Kuma can check both servers and alert you if either stops responding. Without monitoring, a silent failure on the secondary leaves you back at one server without knowing it.
Is a Second DNS Server Worth It?
For anyone running network-wide ad blocking or filtering, yes. One server makes the house depend on a single SD card and power supply. The second server removes that dependence for little money and about an hour of setup.
The case is weaker if you use your ISP’s DNS, because there is no local server to fail. The value appears once you run your own resolver. Our look at whether self-hosting is worth it covers the wider trade-offs.
Frequently Asked Questions
Do I really need a second DNS server at home?
Need is a strong word; want is more accurate. If you run network-wide ad blocking or filtering, one server is a single point of failure for the whole house. A second server costs very little and removes a whole class of “the internet is broken” complaints.
Can my router act as the secondary DNS server?
It can be listed as secondary, but it usually forwards queries to your ISP’s DNS. That defeats the purpose when you run Pi-hole or AdGuard Home for blocking. A real second copy of your DNS software is the right backup.
Will two DNS servers slow down browsing?
No. DNS queries are tiny, and clients only lean on the secondary when the primary is slow or down. Two independent caches can even make repeat lookups slightly faster.
Which software works best for a DNS pair?
AdGuard Home is the easiest for beginners and includes encrypted upstreams out of the box. Pi-hole has the biggest community and the most guides. Both work well as a mirrored pair, so run the same one on both devices.
Can the two servers use different hardware?
Yes. A Raspberry Pi plus an old laptop, or a NAS container plus a virtual machine, works fine. Both devices just need to stay powered on, stay reachable on your network, and keep their static IP addresses.

