Change the DNS on your Ubuntu desktop
Applies to: Ubuntu Desktop with the GNOME Settings app (verified against the current GNOME help and a guide written on Ubuntu 22.04); the same NetworkManager handles wired and Wi-Fi connections
Short answer: In GNOME Settings, open the Network panel, click the gear icon next to the active connection, and on the IPv4 tab switch the DNS setting from Automatic to off; type the two addresses and click Apply. Register your IP with your Smart DNS provider first. Do not edit /etc/resolv.conf by hand - on Ubuntu it is a generated symlink.
This guide covers Ubuntu Desktop with GNOME Settings, the default since Ubuntu 17.10 and unchanged in the 22.04/24.04 line for this panel. The steps change the name servers of one connection (Wi-Fi or wired) and leave the IP configuration on DHCP. If you manage a server or a headless box, jump to the terminal section at the bottom; if you want the change for every device at once, set the DNS on the router instead, as the router Smart DNS guide describes.
This guide covers Ubuntu Desktop with GNOME Settings, the default since Ubuntu 17.10 and unchanged in the 22.04/24.04 line for this panel. The steps change the name servers of one connection (Wi-Fi or wired) and leave the IP configuration on DHCP. If you manage a server or a headless box, jump to the terminal section at the bottom; if you want the change for every device at once, set the DNS on the router instead, as the router Smart DNS guide describes.
Before you start
- Get the two name server addresses from your Smart DNS provider (dashboard or setup page). If you are still choosing a service, the standalone Smart DNS ranking compares them, and what Smart DNS is explains the difference to a VPN.
- Register or validate your current IP address in the provider dashboard. Smart DNS services route lookups for known IPs only; re-register after a router reboot or a network change.
- Plan for IPv6. If your connection is dual-stack, the network also hands out IPv6 resolvers; the dialog has an IPv6 tab next to IPv4 [1] and you should set the provider's IPv6 addresses there too.
Which version do I have?
Open Settings > About (or run lsb_release -a in a terminal) to read the release. This walkthrough is verified against a guide written on Ubuntu 22.04 [4]; the Network panel and its DNS switch are documented identically in the current GNOME help [1], which is version-neutral. The Ubuntu setup hub has a decoder that tells you which tooling your install uses (GNOME Settings vs the older nm-connection-editor dialog).
Steps
Step 1: Open the Settings app
Open the Activities overview (top-left Activities or the Super key), type Settings, and start the Settings app. The official GNOME help begins its flow the same way: open the Activities overview and start typing Settings [1].
Menu path: Activities > Settings
You should now see: the Settings window with a sidebar of sections: Wi-Fi, Network, Bluetooth, Notifications and more.
If it doesn't work: if you are on a Wi-Fi-only machine, the panel is labelled Wi-Fi instead of Network; the steps below work the same with that panel.
Step 2: Go to the Network panel
In the Settings sidebar, select Network (or Wi-Fi on wireless-only systems). The official help says: if you plug in to the network with a cable, click Network; otherwise click Wi-Fi [1]. Ubuntu's own help page describes the identical panel and the same choices [2].
Menu path: Settings > Network (or Settings > Wi-Fi)
You should now see: a connection row for the active interface - "Wired" for Ethernet or your Wi-Fi network name - each with a small gear button on the right.
If it doesn't work: if the panel is empty, the network cable is unplugged or Wi-Fi is off; turn it on in the panel header first.
Step 3: Open the details of your active connection
Click the gear icon next to the connection that shows as connected. The official help calls it the settings button: for a Wi-Fi connection, the settings button will be located next to the active network [1]. The independent walkthrough locates the same control next to the active connection in the Network settings [4].
Menu path: Settings > Network > (gear icon on the active connection)
You should now see: a dialog with tabs across the top - Details, IPv4, IPv6, Security (Wi-Fi) and Proxy.
If it doesn't work: if there are two gear icons (one for the profile, one for the hardware), pick the one on the connection row itself.
Step 4: Choose the IPv4 tab
Select the IPv4 tab in the dialog. The official help says to select the IPv4 or IPv6 tab at this point in its flow [1]; for a first setup on a normal network, IPv4 is where most providers' addresses belong.
Menu path: Settings > Network > (gear) > IPv4
You should now see: the IPv4 settings: the Method dropdown (Automatic (DHCP) by default), the DNS section with an Automatic switch, and the Routes section.
If it doesn't work: if the dialog has no IPv4 tab, the connection is managed by a tool other than NetworkManager (some server installs); use the terminal section at the bottom instead.
Step 5: Switch DNS from Automatic to off
In the DNS section, switch the Automatic switch to off. That is the exact wording of the official help [1], and the independent guide describes the same toggle: before setting the DNS servers, click the "Automatic" toggle, switching it off [4]. Leaving the Method on Automatic (DHCP) keeps your IP configuration; only the DNS stops following the network.
Menu path: Settings > Network > (gear) > IPv4 > DNS > Automatic
You should now see: an empty text field appear below the switch, ready for addresses separated by commas.
If it doesn't work: if the switch is greyed out, the dialog belongs to a managed connection profile; unlock with an administrator account or use nmcli.
Step 6: Enter the Smart DNS addresses
Type the first provider address, a comma, then the second address - for example 203.0.113.10,203.0.113.11, using the addresses from your provider. To add more than two, the help documents the plus button for additional DNS server addresses [1]. Do not mix the provider's addresses with public resolvers: Smart DNS routes specific hostnames through its own servers.
Menu path: Settings > Network > (gear) > IPv4 > DNS
You should now see: both addresses in the field, comma-separated, with the Automatic switch still off.
If it doesn't work: if the field rejects an entry, check that you did not paste a hostname - the field wants IP addresses (IPv4 on this tab, IPv6 addresses on the IPv6 tab).
Step 7: Apply the change and reconnect
Click Apply, then reconnect to the network so the resolver picks up the new servers. The official help closes its flow with: click Apply; if you are not connected to the network, open the system menu from the right side of the top bar and connect [2]. The independent walkthrough adds that the connection should be re-established for the change to take effect [4].
Menu path: Settings > Network > (gear) > IPv4 > Apply
You should now see: the dialog closes and the connection re-negotiates; the network row returns to "Connected".
If it doesn't work: if the reconnect fails, toggle the connection off and on in the panel once; a half-applied profile usually settles on the second try.
Step 8: Repeat on the IPv6 tab
Open the same dialog again, choose the IPv6 tab, switch its DNS Automatic switch off, and enter the provider's IPv6 addresses (or leave it on if the provider publishes none). The help documents the IPv6 tab directly after IPv4 [1], and skipping it is the most common reason half the traffic still uses the old resolver.
Menu path: Settings > Network > (gear) > IPv6 > DNS
You should now see: the same pattern as IPv4 - switch off, field filled, Apply.
If it doesn't work: if your provider has no IPv6 addresses and the network is heavily IPv6-first, disabling IPv6 on the router for testing is the honest fallback rather than guessing addresses.
Verify it works
Open your provider's dashboard or status page in the browser: most services show whether your current IP is registered and which region you appear from. Then open a streaming site that uses the service and confirm the catalog you expect.
- To see which servers the system actually uses, run
resolvectl statusin a terminal; the interface section lists the DNS servers now in effect.resolvectl query example.comshows a live lookup. - If the dashboard still shows your home region, disconnect and reconnect first, then re-check.
- If the dashboard is unreachable, the lookup path itself is broken - continue with the error pages below.
Undo this change
Open the connection dialog, switch the DNS Automatic switch back on (on both IPv4 and IPv6), and click Apply. The connection then follows the resolvers the network hands out again. If you made router-level changes while troubleshooting, undo those too, because they apply to every device on the network.
Terminal alternative and the resolv.conf caveat
You can do the same change from the terminal with NetworkManager's command-line tool; the independent guide documents the command pattern [4]. The steps for the profile YourConnection are:
sudo nmcli connection modify "YourConnection" ipv4.dns "203.0.113.10 203.0.113.11"- sets the IPv4 servers.sudo nmcli connection modify "YourConnection" ipv6.dns "2001:db8::10"- sets the IPv6 servers (if your provider publishes them).sudo nmcli connection modify "YourConnection" ipv4.ignore-auto-dns yes- stops DHCP-provided resolvers from overriding your entries.sudo nmcli connection down "YourConnection" && sudo nmcli connection up "YourConnection"- re-activates the profile so the resolver reads the new servers.
What you should avoid is editing /etc/resolv.conf by hand. On Ubuntu Desktop that file is a symlink into systemd-resolved's runtime files - on 22.04 and 24.04 it normally points at the stub file [5][6] - and the project documentation states that the stub file "should not be used directly by applications, but only through a symlink from /etc/resolv.conf" [5]. A symlink target is regenerated whenever the resolver or the connection changes, so hand-written entries vanish on the next restart or reconnect. If you need system-wide servers beyond a connection profile, configure them through the resolver's own configuration rather than the generated file.
Common errors on this device
Two glibc messages and one tool wrapper cover nearly every failed Smart DNS setup on Ubuntu. "Temporary failure in name resolution" means the resolver returned nothing usable - see fix Temporary failure in name resolution on Ubuntu. "Name or service not known" is the authoritative negative answer, usually a typo or a domain that does not exist - see fix Name or service not known on Ubuntu. Command-line tools and scripts report the same failure as "Could not resolve host" (curl exit code 6) - see fix curl Could not resolve host on Ubuntu. If you changed the DNS on the connection and the error persists, the step that matters most is the Apply plus reconnect in Step 7 - the resolver reads the new servers only after the connection re-negotiates.
FAQ
Which DNS setting do I change - IPv4, IPv6 or both?
Both if your network is dual-stack. The official help documents the IPv4 and IPv6 tabs side by side in the same dialog [1]; if you set addresses only on IPv4, applications that reach sites over IPv6 can still query the network-provided resolver.
Do I have to set the IP method to Manual to change DNS?
No. The guide you are reading keeps the connection on DHCP and only switches the DNS toggle off, which is exactly how the independent walkthrough documents it [4]. The official help page describes the DNS switch as one step of its full manual-setup flow [1]; the switch itself is present regardless of the IP method.
Can I just edit /etc/resolv.conf instead?
On Ubuntu Desktop, that file is a symlink to a file systemd-resolved generates, and hand edits are overwritten when the resolver restarts or the connection changes [5]. Change the DNS on the connection (or with nmcli) and let the resolver pick it up.
Where do I get the Smart DNS addresses?
Your provider publishes two name server addresses in its dashboard and usually requires your current IP to be registered or validated. Compare providers in the standalone Smart DNS ranking.
Does this change apply to every user and network?
The setting belongs to the connection profile, so it follows that network for all users. Other saved networks keep their own DNS until you repeat the steps, which is why a router-level change is the alternative for whole-household setups the router guide explains it.
Need a provider first? The comparison table has the live values:
Sources
- GNOME Help - Manually set network settings - accessed 2026-11-23
- Ubuntu Help - Manually set network settings (via Wayback snapshot; live URL returned 503 to scripted fetchers) - accessed 2026-11-23
- Unlocator Support - How to Set Up DNS on Ubuntu - accessed 2026-11-23
- Pi My Life Up - How to change DNS settings on Ubuntu - accessed 2026-11-23
- freedesktop.org - systemd-resolved service documentation - accessed 2026-11-23
- Apisylux - Temporary Failure in Name Resolution on Ubuntu - accessed 2026-11-23