Change the DNS on your UniFi gateway
Applies to: UniFi Cloud Gateways and gateways (UDM, UDR, UCG, UXG) and self-hosted UniFi Network Servers running the UniFi Network application
Short answer: In the UniFi Network app open Settings > Networks, select your LAN and set the DNS Server under DHCP Service Management so clients receive your Smart DNS addresses; the WAN resolver sits separately under Settings > Internet. Register your IP with your Smart DNS provider first, then reconnect your clients.
This guide is for UniFi owners who want Smart DNS for the whole household: a UniFi Cloud Gateway, a Dream Machine class gateway, or a self-hosted UniFi Network Server. UniFi keeps DNS in two distinct places, and knowing which one to change is most of the job. The WAN field decides which resolver the gateway itself uses; the per-network field decides which DNS addresses your televisions, consoles and phones receive over DHCP. Both are documented by Ubiquiti [1], and an independent UniFi guide walks the same screens [4].
One caution before you start: Ubiquiti explicitly warns against DNS servers that cannot resolve ui.com, because UniFi's own services and WAN health checks depend on that domain [1][7]. Your Smart DNS provider addresses resolve the streaming domains you care about, so keep a fallback plan - the error pages linked at the bottom cover what to do if a UniFi service stops updating afterwards.
This guide is for UniFi owners who want Smart DNS for the whole household: a UniFi Cloud Gateway, a Dream Machine class gateway, or a self-hosted UniFi Network Server. UniFi keeps DNS in two distinct places, and knowing which one to change is most of the job. The WAN field decides which resolver the gateway itself uses; the per-network field decides which DNS addresses your televisions, consoles and phones receive over DHCP. Both are documented by Ubiquiti [1], and an independent UniFi guide walks the same screens [4].
One caution before you start: Ubiquiti explicitly warns against DNS servers that cannot resolve ui.com, because UniFi's own services and WAN health checks depend on that domain [1][7]. Your Smart DNS provider addresses resolve the streaming domains you care about, so keep a fallback plan - the error pages linked at the bottom cover what to do if a UniFi service stops updating afterwards.
Before you start
- Have two DNS addresses ready from your Smart DNS provider. If you are still choosing, compare the standalone options under Smart DNS providers.
- Register your IP address with the provider from your home network. Smart DNS matches your public IP, and an unregistered IP is the most common reason a configured service stays silent.
- Plan the WAN field too. Ubiquiti says UniFi uses the ISP-provided DNS server by default [1]; leaving the WAN field on auto while setting client DNS works, but setting both keeps behaviour predictable.
- Know your admin credentials for the Network app. If you administer the network through unifi.ui.com you need your UI account; local access uses the gateway address shown in the app.
Which version do I have?
Open the UniFi Network application. You reach it in a browser at the gateway's IP address, or from anywhere via unifi.ui.com, or in the UniFi mobile app. The layout that matters here is the Settings tree: Settings > Internet holds the WAN connection, and Settings > Networks lists your networks, including the default LAN [1]. If your hardware is a Cloud Key or a UniFi recorder rather than a gateway, Ubiquiti routes you to UniFi OS > Console Settings > IP Configuration instead - that console takes its DNS from UniFi OS or from the upstream DHCP server [1], and it is not the box handing DNS to your streaming devices.
The brand overview with the full decoder lives on the UniFi setup page.
Steps
Step 1: Open the UniFi Network app
Use a device connected to your network.
Menu path: Browser address bar > gateway IP or unifi.ui.com > UniFi Network
You should now see: the UniFi dashboard with your devices and clients listed.
If it doesn't work: if the local address fails, log in at unifi.ui.com and pick the site; if the app itself is unreachable, the gateway may be adopting or updating, which pauses the interface until it finishes.
Step 2: Open Settings > Internet and set the WAN DNS
This decides which resolver the gateway itself queries.
Menu path: Settings > Internet > [WAN connection] > DNS Server
You should now see: the WAN configuration. Ubiquiti's DNS guide gives the path as "UniFi Network > Settings > Internet > DNS Server" for Cloud Gateways [1]. On the same screen, the independent guide documents setting Advanced to Manual and unchecking the DNS Server Auto checkbox under IPv4 Configuration before typing primary and secondary addresses [2].
If it doesn't work: if DNS Server shows auto and cannot be edited, switch the Advanced toggle to Manual first [2]; if your WAN uses PPPoE or a VLAN tag, leave those values untouched while editing DNS only.
Step 3: Open Settings > Networks
Now the DNS your clients actually receive.
Menu path: Settings > Networks
You should now see: the list of your networks, typically Default plus any VLANs you created [1].
If it doesn't work: if Networks is missing from Settings, your account may lack admin rights - ask the site administrator, or check you are in the right site when running multiple sites.
Step 4: Select your LAN and find DHCP Service Management
The client-facing DNS field hides behind the advanced options.
Menu path: Settings > Networks > [Network Name] > DHCP Service Management
You should now see: Ubiquiti's guide names the field explicitly: "UniFi Network > Settings > Networks > [Network Name] > DHCP Service Management > DNS Server" [1]. The independent guide adds the sequence: scroll to the DHCP section, then "Click on Show Options next to DHCP Service Management" [4], with the Advanced settings toggle set to manual.
If it doesn't work: if you see no DHCP section, expand the advanced options for that network first; the toggle is per network, not global [2].
Step 5: Switch DHCP DNS off auto and enter the addresses
This is the field your devices receive.
Menu path: DHCP Service Management > DNS Server (turn auto off)
You should now see: editable DNS server fields. The independent guide's sequence is to "Uncheck DHCP Server (auto)" and then "Enter the desired DNS Servers that you want to use" [4]. Put your Smart DNS primary address in the first field and the secondary in the second.
If it doesn't work: type complete addresses such as 192.0.2.10; if the app rejects a value, check for a stray space or a missing octet before blaming the network.
Step 6: Apply the changes
Save so DHCP starts handing out the new addresses.
Menu path: Networks > Apply Changes
You should now see: the settings saved and the network row reflecting your values.
If it doesn't work: if the app reports a failure on save, re-check the addresses; the WAN field from Step 2 uses the same Apply Changes button in its own section.
Step 7: Reconnect your clients
UniFi documents the lease behaviour: the change takes effect after each device's DHCP lease expires, usually after 24 hours, and restarting the device expedites it [3].
Menu path: Device > Wi-Fi settings > forget network, then rejoin
You should now see: the device reconnecting with a fresh lease carrying your new DNS addresses.
If it doesn't work: restart the device rather than toggling Wi-Fi on some platforms; smart TVs often keep the old lease until a full power cycle.
Verify it works
Open a video service the Smart DNS plan covers and confirm the expected regional catalogue appears. As a second check, look at the provider's status page: most services show whether your current public IP is registered. On the network side, a DNS lookup from any client should now answer from your provider's resolver rather than the gateway - remember that by default the gateway itself is the client DNS, so the fastest check is the streaming behaviour, not the resolver name. If a specific device keeps resolving elsewhere, it likely has a manual DNS of its own; fix that device using the matching device setup guide.
Undo this change
Return to Settings > Networks > [Network Name] > DHCP Service Management, set DNS back to auto, and apply. Then restore the WAN field under Settings > Internet to its previous state (auto unless your ISP requires specific servers). Reconnect clients afterwards so they pick up the gateway-as-DNS default again, which Ubiquiti documents as the DHCP default [6].
Common errors on this device
Three failure patterns matter after a UniFi DNS change. If clients keep resolving through the old servers, that is the documented lease behaviour - see Clients keep using the old DNS. If the gateway suddenly reports the WAN as offline, the health-check probes are the likely cause - see WAN shows offline after a DNS change. And if UniFi's own services stop updating, Ubiquiti warns that custom DNS which cannot resolve ui.com breaks them - see UniFi services fail after a DNS change. All three are covered in the UniFi brand overview.
FAQ
Where do the DNS fields live in the UniFi Network app?
There are two places and they do different jobs. Ubiquiti's own DNS guide names the client-facing field under Settings > Networks > [Network Name] > DHCP Service Management > DNS Server, and the gateway's own resolver under Settings > Internet > DNS Server. For Smart DNS you normally change both, but the per-network field is the one your devices actually receive.
Does the WAN DNS change alone route my devices through Smart DNS?
No. Ubiquiti's DHCP documentation says clients are handed the gateway's own address as their DNS server by default, so the gateway resolves on their behalf using the WAN resolver. If you only change the WAN side, client traffic flows through the gateway's resolver, which is enough for Smart DNS on most setups, but the per-network field gives you direct control.
Why do my devices still show the old DNS after saving?
UniFi's DNS guide states that a changed DHCP DNS setting takes effect after the device's DHCP lease expires, usually after 24 hours, and recommends restarting the device to speed this up. Forgetting and rejoining the Wi-Fi network has the same effect.
Can I set different DNS per VLAN?
Yes. DHCP Server is enabled on each individual virtual network by default, so each network carries its own DHCP Service Management section. Set the DNS Server field on the network whose devices should use Smart DNS and leave the others alone.
Does this guide apply to the UniFi mobile app?
The mobile app mirrors the same Settings tree, but we verified the browser interface paths against Ubiquiti documentation and an independent guide. We did not verify the mobile app screens separately, so treat app labels as reported rather than documented.
Need a provider first? The comparison table has the live values:
Sources
- Ubiquiti Help Center - UniFi DNS Troubleshooting Guide - accessed 2026-11-23
- Ubiquiti Help Center - UniFi DNS Troubleshooting Guide (WAN section) - accessed 2026-11-23
- Ubiquiti Help Center - UniFi DNS Troubleshooting Guide (lease note) - accessed 2026-11-23
- LazyAdmin - UniFi Local and Server DNS Settings Explained - accessed 2026-11-23
- LazyAdmin - UniFi Local and Server DNS Settings Explained (WAN steps) - accessed 2026-11-23
- Ubiquiti Help Center - UniFi DHCP Server - accessed 2026-11-23
- Ubiquiti Help Center - WAN Failover, Load Balancing and Port Remapping on UniFi Gateways - accessed 2026-11-23