Fixing DNS Failures on Fedora 38: A Systemd‑Resolved Diagnostic Guide
If DNS resolution fails on Fedora 38, the culprit is often a mis‑configured systemd‑resolved service. This guide walks through a diagnostic checklist, fixes tied to findings, and escalation steps to restore name resolution.
20 Jan 2026, 16:58 UTC

Recognizable Condition
On a fresh Fedora 38 install you may notice browsers, ping, and curl can’t resolve domain names, yet dig @8.8.8.8 example.com works. The system reports “Could not resolve host” or “Temporary failure in name resolution.”
Common Causes
| Cause | Description |
|---|---|
systemd-resolved inactive or failed | The DNS stub that NetworkManager relies on isn’t running. |
Missing or invalid DNS= entries in /etc/systemd/resolved.conf | Systemd has no upstream servers to forward queries. |
/etc/resolv.conf not a symlink to /run/systemd/resolve/stub-resolv.conf | Applications read static or wrong file. |
NetworkManager’s DNS plugin overriding systemd-resolved | NetworkManager writes its own resolv.conf, bypassing the stub. |
Diagnostic Checklist
- Check service status
sudo systemctl status systemd-resolvedExpect
active (running). Ifinactiveorfailed, move to Step 1a. - Verify
/etc/resolv.conflinkagels -l /etc/resolv.confShould show
resolv.conf -> /run/systemd/resolve/stub-resolv.conf. If not, proceed to Step 2. - Inspect
/etc/systemd/resolved.confcat /etc/systemd/resolved.confLook for
DNS=orFallbackDNS=lines. If missing or commented, go to Step 3. - Confirm NetworkManager DNS mode
nmcli device show | grep DNSEntries prefixed with
IP4.DNSindicate NetworkManager is supplying DNS. If present, proceed to Step 4. - Run a status query
systemd-resolve --statusCheck that
DNS Serverslists at least one reachable IP. If empty, follow Step 5.
Step‑by‑Step Fixes
1a. Start or Restart systemd‑resolved
sudo systemctl enable --now systemd-resolved
Requires sudo. After restart, re‑run Step 1.
2. Re‑create the resolv.conf symlink
sudo rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
Risk: Removing the file could break scripts that expect a static file. Verify with cat /etc/resolv.conf shows nameserver 127.0.0.53.
3. Add DNS servers to resolved.conf
sudo nano /etc/systemd/resolved.conf
Add or uncomment:
DNS=8.8.8.8 8.8.4.4 FallbackDNS=1.1.1.1 1.0.0.1
Then reload:
sudo systemctl restart systemd-resolved
4. Disable NetworkManager’s DNS plugin
sudo nano /etc/NetworkManager/NetworkManager.conf
Add or ensure the following section exists:
[main] dns=none
Restart NetworkManager:
sudo systemctl restart NetworkManager
5. Verify DNS resolution works
ping -c 3 example.com
systemd-resolve --status | grep "DNS Servers"
Both commands should succeed. If ping fails, check firewall or ISP blocking UDP 53.
Escalation Criteria
- After all steps, DNS still fails and
systemd-resolve --statusshows no servers. - NetworkManager continues to override
/etc/resolv.confdespitedns=none. - System logs contain repeated
systemd-resolved: failed to resolveerrors.
At this point consider disabling systemd-resolved and using NetworkManager’s built‑in DNS, or consult the Fedora bug tracker for a known issue.
Practical Verification and Limitations
After applying the fixes, run:
systemd-resolve --status | grep "DNS Servers"
cat /etc/resolv.conf
If you see the expected upstream IPs and nameserver 127.0.0.53, the stub is active. However, some corporate environments use DNS over HTTPS or require custom search domains; in those cases you may need to configure systemd-resolved accordingly.
Limitations:
- These steps assume Fedora 38 with default NetworkManager. Custom network setups may differ.
- Disabling
systemd-resolvedis a last resort; it can break services that expect the stub. - Firewall rules that block DNS traffic will still cause failures after configuration is correct.
Always back up configuration files before editing.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.