Prerequisites
Before checking DNS, make sure you have:
- SSH access to your VPS
Using dig (Recommended)
Connect to your VPS:
ssh hxroot@YOUR_SERVER_IP -p 22
Install dig:
apt install dnsutils -y
Basic lookup:
dig google.com
Short answer only:
dig google.com +short
Check Specific Record Types
A record (IPv4):
dig google.com A +short
MX record (mail servers):
dig google.com MX +short
NS record (name servers):
dig google.com NS +short
TXT record (SPF, DKIM, etc.):
dig google.com TXT +short
Using nslookup
nslookup google.com
Check Reverse DNS (PTR)
dig -x 8.8.8.8 +short
✅ You can now check DNS resolution from your VPS.