Apply for Free VPS

Look up DNS records and set resolvers

Updated 27 Nov 2026 dns

Check records with dig and see which DNS servers your VPS uses.

Tools

sudo apt install -y dnsutils          # Ubuntu, Debian
sudo dnf install -y bind-utils        # AlmaLinux, Rocky

Look up records

dig +short example.com A
dig +short example.com AAAA
dig +short example.com MX
dig +short example.com TXT
dig @1.1.1.1 example.com +trace

+trace follows the delegation from the root, which shows where an answer goes wrong.

Which resolver is in use?

resolvectl status          # systems with systemd-resolved
cat /etc/resolv.conf

Changes take time

Resolvers keep answers for the record's time to live. Lower it before a planned move, wait, then change the record.

Changing resolvers

Cloud images manage network settings at boot, so direct edits to /etc/resolv.conf may be overwritten. With systemd-resolved, create /etc/systemd/resolved.conf.d/dns.conf:

[Resolve]
DNS=1.1.1.1 9.9.9.9

Then restart systemd-resolved.

Was this helpful?

Report outdated or incorrect information