Affected versions: Ubuntu 26.04 LTS

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

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
Illustrative mockup for ubuntu-26-04-lts — resolvectl_status
Checking resolver state with resolvectl — Illustrative mockup — Progressive Robot

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
Illustrative mockup for ubuntu-26-04-lts — restart_resolved
Restarting and reconfiguring systemd-resolved — Illustrative mockup — Progressive Robot

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.

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.