📖 ~1 min read
Table of contents
Symptom & Impact
Hostname resolution fails intermittently, disrupting package access and service discovery.
Environment & Reproduction
Can occur after VPN, DHCP, or split-DNS profile changes.
resolvectl query archive.ubuntu.com
Root Cause Analysis
Resolver receives invalid upstream DNS config or stale link-scoped settings from network manager stack.
Quick Triage
Check `/etc/resolv.conf` symlink target and resolved service health.
ls -l /etc/resolv.conf && systemctl status systemd-resolved
Step-by-Step Diagnosis
Inspect per-link DNS, domains, and transaction statistics.
resolvectl status

Solution – Primary Fix
Restore correct resolver symlink, set valid DNS servers, and restart resolver service.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf && sudo systemctl restart systemd-resolved

Solution – Alternative Approaches
Configure DNS directly in netplan or NetworkManager connection profiles for deterministic behavior.
Verification & Acceptance Criteria
`resolvectl query` and `dig` succeed consistently across required domains.
Rollback Plan
Revert resolver symlink and DNS profile changes if new settings break internal name resolution.
Prevention & Hardening
Define approved DNS order and monitor resolver health metrics after network policy changes.
Related Errors & Cross-Refs
See also search-domain loops, DNSSEC failures, and stale DHCP lease options.
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
Ubuntu systemd-resolved and DNS operations documentation.
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.