Start your 3-day free trial
Sign up to experience all premium features at no cost.
*Available only to new users. Each user is limited to one trial.


When Ubuntu DNS is not working, first prove that the network link and IP path still work, because DNS resolution problems on Ubuntu exist only when that path works but a hostname fails or returns the wrong answer. Then run resolvectl status and resolvectl query to see which DNS server and routing domain the active link actually uses, and record the current owner and values before testing one temporary change. After clearing it, let the configuration owner reapply its settings and compare the result with the saved state.
Key Takeaways
- A Wi-Fi or Ethernet link, an IP route, internet reachability, and DNS resolution are different layers.
- Ubuntu can select DNS per link; the server listed globally may not handle a particular query.[1]
/etc/resolv.confmay be managed by systemd-resolved or another network component. Do not overwrite or unlink it blindly.[2]- A public resolver can be a temporary comparison, not a universal permanent fix.
Start with the general Device and App Troubleshooting Guide if several layers may be failing. The existing DNS server not responding overview explains DNS more broadly; this guide focuses on Ubuntu's current resolver state.
Save the failing hostname, exact error, time, active interface, and current resolvectl status output before changing anything.
Confirm that the expected Wi-Fi or Ethernet link is up and that the failing path has a route. If the link or route is absent, remain on that branch instead of changing DNS.
Compare an authorized IP-level check with a system hostname query. Treat DNS as the leading hypothesis only when the IP path works and name resolution fails or returns the wrong answer.
Run resolvectl status and resolvectl query for the exact name. Identify the chosen link, server, routing domain, and whether the failure is global or limited to one domain.
Inspect /etc/resolv.conf and the active network stack. Record whether NetworkManager, Netplan, DHCP, a VPN, systemd-resolved, or policy supplies the value.
If the owner and environment permit it, change one per-link DNS value temporarily, repeat the same query, then run resolvectl revert for that link.
Let the configuration owner reapply its settings and compare the new status with the saved output. Do not describe revert as restoring a saved snapshot.
Make a persistent repair only in the owning layer, with a rollback path, then repeat the original query and confirm that internal as well as public names behave as intended.
The result of each step decides the next branch. If both IP and name checks fail, a public resolver comparison cannot prove a DNS-only fault. If only one split-DNS name fails, replacing every resolver can break the routes that still work. If the temporary server succeeds, you have a useful comparison—not permission to leave an unmanaged override behind.
Write down the failing hostname, exact error, time, network interface, and whether the same request works on another device or network. Check the link and routes without assuming that a connected icon proves internet access:
ip -brief link
ip route
Then compare an IP-level destination that you are authorized to test with a hostname used by the same service. A successful IP path plus a failed name query supports a DNS hypothesis. If both fail, investigate the router, captive portal, local route, firewall, or upstream connection instead. The router no-internet troubleshooting tree covers network-wide failures.
Avoid using only a cached browser tab as the test. Browsers can use their own encrypted DNS setting, cache, proxy, or secure network feature, so compare a system resolver query as well.
resolvectl status show?Run:
resolvectl status
resolvectl query example.com
Replace example.com with the actual failing hostname when it is safe to disclose locally. Status shows global and per-link DNS servers, search or route-only domains, protocols, and the active interface state. Query reports the returned addresses and usually the link and protocol involved. The resolvectl manual also provides statistics and cache-reset operations, but resetting a cache should follow evidence, not replace diagnosis.
Look for:
Per-link routing means two servers in the output are not necessarily interchangeable. A corporate domain may deliberately go to a VPN link while public names use the home connection.
Inspect the resolver file rather than editing it:
ls -l /etc/resolv.conf
cat /etc/resolv.conf
systemctl is-active systemd-resolved
The systemd-resolved manual describes several supported /etc/resolv.conf modes, including symlinks to a local stub or generated resolver list, as well as operation with a file managed elsewhere. A generated file can change when DHCP, NetworkManager, Netplan, a VPN, or a management policy updates the link.
Identify the actual owner on this machine. NetworkManager profiles, Netplan configuration, server network tools, and organization policy have different persistent configuration paths. Do not copy a file path from another Ubuntu version and treat it as universal. If the device is managed, ask the administrator before changing DNS or a VPN profile.
First save the relevant resolvectl status output and identify the interface name. If systemd-resolved owns the active per-link state, an administrator can temporarily set a test server on that link:
sudo resolvectl dns interface-name resolver-address
resolvectl query example.com
sudo resolvectl revert interface-name
Use actual values appropriate to your network. The revert command removes the temporary override and resets all per-link DNS settings to their defaults; it does not replay a saved configuration. After reverting, let the actual configuration owner reapply its settings, reconnecting only when that is the owner's supported method, and compare resolvectl status with the output saved before the test. Run the same query before, during, and after the change. A success during the test suggests the original server or its route needs investigation; it does not prove that the test server is the correct permanent choice.
Do not change DNS and disable a VPN, proxy, firewall, and IPv6 at the same time. Multiple changes destroy the comparison. Do not permanently hard-code a public resolver on a network that requires internal names, filtering, parental controls, or organization policy.
Repair the layer that owns the value:
Record the original configuration and have a rollback path before applying a persistent change. Afterward, reconnect or apply only through the owning tool, then repeat resolvectl status and the original query.
apt update?Preserve the exact repository hostname and error. If resolvectl query fails for that hostname, remain on the DNS branch. If it resolves but APT reports a signature, release-file, TLS, repository, or dependency error, DNS is not the primary diagnosis. Continue with the guide to APT errors and dependency recovery.
Prove link and IP reachability before calling a failure DNS. Read global and per-link state with resolvectl, identify which component owns the values, and change one variable only. Clear the temporary override and let the owner reapply its settings; make any persistent repair in NetworkManager, Netplan, DHCP, VPN, or policy—not by blindly replacing /etc/resolv.conf.
That pattern can indicate name-resolution failure because the IP route works without translating a name. Confirm with resolvectl query and rule out an application-specific proxy or cache.
Ubuntu can receive servers from multiple links. Routing domains and the default DNS route determine which link handles a query, especially with VPN split DNS.
/etc/resolv.conf directly?Usually not until you know its owner. It may be a managed symlink or generated file, so a direct edit can be overwritten or break the supported resolver mode.
No. A restart may clear temporary state but does not correct a bad DHCP value, failed upstream server, wrong routing domain, or managed VPN policy.
/etc/resolv.conf symlink?No. First identify its documented mode and configuration owner. Deleting it can disconnect applications from the local stub or generated server list.
Only after considering internal domains, privacy, filtering, policy, and reliability. A short comparison is not enough evidence for a permanent change.
On Ubuntu Server, Netplan usually owns the persistent DNS values, listed under the interface's nameservers key with addresses and optional search entries. Edit that owning Netplan file, or the cloud-init setting that generated it, instead of /etc/resolv.conf, then apply the change with sudo netplan try: it rolls the change back unless you confirm it within the timeout, 120 seconds by default. Keep console access, confirm that a rejected change was really reverted, and repeat resolvectl status and the original query.
resolvectl dns test?Run sudo resolvectl revert interface-name for the same link. This clears the temporary override and resets that link's DNS settings to their defaults; it does not restore saved settings. Let the configuration owner reapply its settings, then compare resolvectl status with the output saved before the test.
If a name fails only after a VPN connects, compare the selected link, DNS server, and routing domain for that same name before and after connection. A VPN profile may supply per-link DNS or route-only domains, so a failure limited to an internal name can reflect split-DNS routing rather than a broken public resolver. Keep the physical network unchanged and follow the network owner's policy for the comparison.[1][2]
If AethoVPN is part of the connection being tested, record its connection state alongside resolvectl status and the original query result. That observation is needed to establish whether this setup changes DNS; the brand name alone does not identify the configuration owner. Repair an incorrect DHCP value or persistent NetworkManager/Netplan setting at its source, and confirm internal names still work after clearing any temporary override.
Disclaimer: Resolver ownership and persistent network configuration vary by Ubuntu release, installation type, network stack, VPN, and organization policy. Preserve console access and original settings before changes.
Sources:
Sources checked 4 October 2026.
Related Articles:
Sign up to experience all premium features at no cost.
*Available only to new users. Each user is limited to one trial.