DNS translates human-readable domain names into the information servers actually need — IP addresses, mail routing, and verification records. This guide explains each core record type and when to use it.
A Record
Maps a domain or subdomain to an IPv4 address.
Type: A
Name: @ (or a subdomain like "app")
Value: 203.0.113.10
This is the record you edit to point a domain at your VPS — see How to Point a Domain to Your VPS (A/AAAA Records).
AAAA Record
Same purpose as an A record, but for IPv6 addresses:
Type: AAAA
Name: @
Value: 2001:db8::1
CNAME Record
Points a subdomain to another domain name (an alias), rather than directly to an IP:
Type: CNAME
Name: www
Value: yourdomain.com
A CNAME cannot coexist with other records on the same exact name, and cannot be used at the root/apex domain in most DNS implementations — see How to Use CNAME Records Correctly.
MX Record
Specifies which mail servers handle email for your domain, and in what priority order:
Type: MX
Name: @
Priority: 10
Value: mail.yourdomain.com
Lower priority numbers are tried first. See How to Configure MX Records for Email Delivery.
TXT Record
Stores arbitrary text data, commonly used for domain verification and email authentication (SPF, DKIM, DMARC):
Type: TXT
Name: @
Value: v=spf1 ip4:203.0.113.10 -all
See How to Configure SPF, DKIM, and DMARC (Complete Guide).
NS Record
Specifies which nameservers are authoritative for your domain — these control where all other DNS records for the domain are actually managed:
Type: NS
Name: @
Value: ns1.yourdnsprovider.com
PTR Record
The reverse of an A record — maps an IP address back to a hostname. See How to Set Up Reverse DNS (PTR/rDNS) for Email Deliverability.
SRV Record
Specifies the host and port for specific services (used by protocols like SIP, XMPP):
Type: SRV
Name: _service._proto.yourdomain.com
Value: priority weight port target
CAA Record
Specifies which certificate authorities are allowed to issue SSL certificates for your domain — an additional security control against unauthorized certificate issuance:
Type: CAA
Name: @
Value: 0 issue "letsencrypt.org"
Understanding TTL (Time to Live)
TTL determines how long resolvers cache a record's value before checking again, measured in seconds. Lower TTL (e.g. 300) means faster propagation of changes but more frequent DNS lookups; higher TTL (e.g. 86400) reduces lookup load but slows change propagation.
Quick Reference Table
| Record | Purpose |
|---|---|
| A | Domain/subdomain → IPv4 address |
| AAAA | Domain/subdomain → IPv6 address |
| CNAME | Subdomain → another domain name (alias) |
| MX | Mail server routing |
| TXT | Verification, SPF, DKIM, DMARC |
| NS | Authoritative nameservers |
| PTR | IP → hostname (reverse DNS) |
| CAA | Restricts which CAs can issue certificates |
Checking Any Record Type
dig A yourdomain.com
dig MX yourdomain.com
dig TXT yourdomain.com
dig NS yourdomain.com
Continue Reading
- How to Point a Domain to Your VPS (A/AAAA Records)
- How to Configure SPF, DKIM, and DMARC (Complete Guide)
- How to Troubleshoot DNS Propagation Issues
Browse more articles in Networking & DNS.
