Configuring DNS Records for Your Domain
DNS records tell the internet how to reach your domain. This guide covers the records you will most commonly need.
A Record — Point Domain to an IP
Type: A
Name: @ (root domain: yourdomain.com)
Value: YOUR_SERVER_IP
TTL: 3600
Type: A
Name: www (www.yourdomain.com)
Value: YOUR_SERVER_IP
CNAME Record — Alias to Another Domain
Type: CNAME
Name: blog
Value: yourdomain.com
This makes blog.yourdomain.com resolve to wherever yourdomain.com points.
MX Record — Mail Server
Type: MX
Name: @
Value: mail.yourdomain.com
Priority: 10
TXT Record — Verification and Email Security
# Domain verification (Google, etc.):
Type: TXT, Name: @, Value: "google-site-verification=abc123"
# SPF (prevents email spoofing):
Type: TXT, Name: @, Value: "v=spf1 ip4:YOUR_SERVER_IP ~all"
# DMARC:
Type: TXT, Name: _dmarc, Value: "v=DMARC1; p=quarantine; rua=mailto:admin@yourdomain.com"
Testing DNS Records
dig yourdomain.com A # Check A record
dig yourdomain.com MX # Check MX record
dig yourdomain.com TXT # Check TXT records
nslookup yourdomain.com
DNS Propagation
DNS changes take 1–48 hours to propagate globally. Check propagation status at whatsmydns.net.
TTL (Time To Live)
Lower TTL (e.g., 300) means faster propagation of changes but more DNS queries. Higher TTL (e.g., 86400) reduces query load. Lower it before a planned migration, then raise it again after.