Find us on social media
Manage your domain DNS
A, CNAME, MX, TXT and NS records explained, TTL, propagation and verification with dig/nslookup.
What is DNS?
DNS (Domain Name System) translates domain names (yourdomain.com) to IP addresses. DNS records tell the internet where to find your site, email and services.
DNS record types
A Record
Points a domain to an IPv4 address:
yourdomain.com A 203.0.113.10
www A 203.0.113.10CNAME Record
Creates an alias pointing to another domain:
www CNAME yourdomain.com
blog CNAME yourdomain.comCNAME cannot be used on the root domain, only on subdomains.
MX Record
Defines email servers:
yourdomain.com MX 10 mail.yourdomain.com
yourdomain.com MX 20 mail2.yourdomain.comThe number is priority (lower = higher priority).
TXT Record
Stores arbitrary text (SPF, DKIM, verifications):
yourdomain.com TXT "v=spf1 mx a ip4:203.0.113.10 ~all"NS Record
Defines authoritative nameservers:
yourdomain.com NS ns1.baires.host
yourdomain.com NS ns2.baires.hostTTL (Time To Live)
TTL defines how long resolvers cache a record:
- 300 (5 min): For frequently changed records
- 3600 (1 hour): Standard value
- 86400 (24 hours): For stable records
Before a migration, lower TTL to 300 in advance.
Common configurations
Point domain to your VPS
@ A YOUR_VPS_IP
www CNAME yourdomain.comConfigure email with Google Workspace
@ MX 1 aspmx.l.google.com
@ MX 5 alt1.aspmx.l.google.com
@ TXT "v=spf1 include:_spf.google.com ~all"DNS propagation
DNS changes are not instant. Propagation can take:
- Low TTL (300): 5-30 minutes
- Standard TTL (3600): 1-4 hours
- High TTL (86400): up to 48 hours
Verify records
# Verify A record
dig yourdomain.com A +short
# Verify MX
dig yourdomain.com MX +short
# Verify TXT
dig yourdomain.com TXT +short
# Verify with nslookup
nslookup yourdomain.comUse whatsmydns.net to check propagation status globally.
Recommendations
- Always verify DNS changes with
digafter applying them - Lower TTL before migrations
- Document your DNS records in a separate file
- Use Cloudflare as DNS for fast propagation (seconds)
- Don't delete MX records if you have active email on the domain