Docs / Troubleshooting / How to Fix DNS Resolution Issues

How to Fix DNS Resolution Issues

By Admin · Feb 25, 2026 · Updated Apr 23, 2026 · 451 views · 1 min read

If your server can't resolve domain names, network requests will fail.

Test DNS Resolution

dig google.com
nslookup google.com
ping google.com

Check DNS Configuration

cat /etc/resolv.conf

Fix: Set DNS Servers

echo "nameserver 8.8.8.8" > /etc/resolv.conf
echo "nameserver 1.1.1.1" >> /etc/resolv.conf

Permanent Fix (systemd-resolved)

Edit /etc/systemd/resolved.conf:

[Resolve]\nDNS=8.8.8.8 1.1.1.1
systemctl restart systemd-resolved

Was this article helpful?