π ~1 min read
Table of contents
Symptom & Impact
Applications intermittently fail DNS lookups despite network connectivity.
Environment & Reproduction
Common with mixed VPN, split-DNS, or stale resolver cache behavior.
resolvectl status
cat /etc/resolv.conf
resolvectl query ubuntu.com
ping -c 2 1.1.1.1
Root Cause Analysis
Resolver receives conflicting DNS routes or stale cache causing negative responses.
Quick Triage
Inspect DNS servers per link and cache statistics.
resolvectl dns
resolvectl domain
resolvectl statistics
journalctl -u systemd-resolved -n 100 --no-pager
Step-by-Step Diagnosis
Reproduce query failures against both stub and upstream resolvers.
dig @127.0.0.53 archive.ubuntu.com
dig @1.1.1.1 archive.ubuntu.com
resolvectl query archive.ubuntu.com

Solution – Primary Fix
Flush resolver cache, normalize DNS route priorities, and restart resolved service.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo resolvectl flush-caches
sudo systemctl restart systemd-resolved
resolvectl reset-statistics
resolvectl status

Solution – Alternative Approaches
Set explicit DNS servers in netplan for deterministic resolver behavior.
sudoedit /etc/netplan/01-netcfg.yaml
sudo netplan apply
resolvectl dns
Verification & Acceptance Criteria
Accepted when repeated DNS queries resolve consistently without SERVFAIL bursts.
for i in $(seq 1 10); do resolvectl query security.ubuntu.com >/dev/null || echo fail; done
resolvectl statistics
Rollback Plan
Revert resolver/network config if static DNS settings break dynamic VPN domains.
sudo cp -a /etc/netplan/01-netcfg.yaml.bak /etc/netplan/01-netcfg.yaml
sudo netplan apply
Prevention & Hardening
Document DNS ownership between VPN, netplan, and systemd-resolved to avoid conflicts.
resolvectl status
networkctl status
Related Errors & Cross-Refs
Related errors include temporary failure in name resolution, SERVFAIL, and stale NXDOMAIN responses.
Related tutorial: View the step-by-step tutorial for Ubuntu 26.04 LTS.
View all Ubuntu 26.04 LTS tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
systemd-resolved documentation, netplan DNS docs, and Ubuntu networking troubleshooting guides.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.