The Three Most Important DNS Records Explained
A Record, MX Record, and TXT Record
The internet runs on names, not numbers. When you type a website address or send an email, something quietly translates those human-friendly names into machine-readable instructions. That translator is the Domain Name System (DNS).
Among the many DNS record types, three stand above the rest because nearly every domain uses them. These are:
- A Record – for websites and servers
- MX Record – for email delivery
- TXT Record – for verification, security, and trust
Understanding how these three records work is the difference between a domain that simply exists and one that actually functions.
1. A Record (Address Record) – The Web’s Front Door
The A Record is the most fundamental DNS record. Its job is simple but critical: It connects a domain name to an IPv4 address.
What an A Record Does
When someone types:
www.example.com
The DNS system looks for an A record that says:
www.example.com → 192.0.2.10
That IP address is where the web server lives.
Without an A record, a website has no physical destination. The domain becomes a signpost pointing nowhere.
Common Uses
- Hosting websites
- Connecting subdomains to servers
- Pointing domains to VPS, cloud, or shared hosting
Example
example.com A 192.0.2.10
www.example.com A 192.0.2.10
Both the root domain and www lead to the same server.
Why the A Record Matters
- It controls where traffic goes
- A wrong IP means downtime
- A deleted A record means a dead website
In hosting environments, changing an A record is like relocating a shop. The sign stays the same, but the building behind it changes.
2. MX Record (Mail Exchange) – The Email Traffic Controller
The MX Record decides where emails for a domain should be delivered. Without it, email servers do not know where to send messages.
What an MX Record Does
When someone sends an email to:
info@example.com
Their mail server asks DNS:
“Which server handles email for Example Domain
The MX record answers that question.
Example
example.com MX 10 mail.example.com
mail.example.com A 192.0.2.20
This means:
- Email goes to
mail.example.com - That mail server lives at
192.0.2.20
Priority Matters
MX records use priority numbers. Lower numbers mean higher priority.
example.com MX 10 mail1.example.com
example.com MX 20 mail2.example.com
- Mail goes to
mail1first - If it fails,
mail2is used as backup
Why the MX Record Matters
- Missing MX records cause email delivery failure
- Wrong priorities can overload servers
- Incorrect targets lead to bounced emails
Email is unforgiving. One misconfigured MX record and messages vanish into silence.
3. TXT Record – The Digital Identity Card
The TXT Record is the most flexible and powerful of the three. It stores text-based instructions used for verification, security, and policy enforcement.
What TXT Records Are Used For
TXT records answer questions like:
- Is this server allowed to send email for this domain?
- Is this domain really owned by this account?
- How should receiving servers treat suspicious messages?
Common TXT Record Types
1. SPF (Sender Policy Framework)
Prevents email spoofing.
example.com TXT "v=spf1 ip4:192.0.2.20 include:_spf.google.com ~all"
This tells the world which servers are allowed to send email.
2. DKIM (DomainKeys Identified Mail)
Adds cryptographic signatures to emails.
default._domainkey.example.com TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkq..."
This proves the email was not altered in transit.
3. DMARC (Email Policy and Reporting)
Controls how email failures are handled.
_dmarc.example.com TXT "v=DMARC1; p=quarantine; rua=mailto:admin@example.com"
This tells receiving servers what to do with suspicious mail.
4. Domain Verification
Used by services like Google, Microsoft, Cloudflare, or social platforms.
example.com TXT "google-site-verification=abc123xyz"
Why TXT Records Matter
- They protect domains from impersonation
- They improve email deliverability
- They establish trust between servers
In modern DNS, TXT records act like contracts written in plain text.
How These Three Records Work Together
Think of a domain as a business building:
-
A Record Points visitors to the physical location
-
MX Record Directs mail deliveries to the mailroom
-
TXT Record Displays security badges, policies, and identity documents
If any one of these is missing or incorrect, the business still exists in name, but operations fail.
Common Mistakes to Avoid
- Pointing MX records to IP addresses instead of hostnames
- Deleting TXT records during “DNS cleanup”
- Forgetting to update A records after server migration
- Mixing SPF records into multiple TXT entries incorrectly
DNS is quiet, but it is not forgiving.
Conclusion
The A, MX, and TXT records form the backbone of every functional domain. They handle visibility, communication, and trust.
- A records make websites reachable
- MX records make email possible
- TXT records make domains secure and verifiable
Master these three, and you control the most important conversations your domain will ever have.
