What Are DNS Records?
DNS (Domain Name System) records are instructions stored in authoritative DNS servers that tell the internet how to handle traffic for your domain. Every time someone types your domain into a browser or sends you an email, DNS records are consulted to route that request to the right destination.
Understanding DNS records is essential for anyone managing a website, setting up email, or troubleshooting connectivity issues.
The Most Important DNS Record Types
A Record (Address Record)
The A record maps your domain name to an IPv4 address. This is the most fundamental DNS record — it's what makes yourdomain.com resolve to your web server.
- Example:
yourdomain.com → 203.0.113.50 - Use case: Pointing your domain to a web server or IP address.
- TTL tip: Use a short TTL (300–600 seconds) if you expect to change servers soon; otherwise 3600 is standard.
AAAA Record
The AAAA record does the same as an A record but for IPv6 addresses — the newer, longer format (e.g., 2001:db8::1). As IPv6 adoption grows, having an AAAA record alongside your A record is good practice.
CNAME Record (Canonical Name)
A CNAME record creates an alias from one domain name to another. Instead of pointing to an IP address, it points to another hostname.
- Example:
www.yourdomain.com → yourdomain.com - Use case: Making www redirect to your root domain, or pointing a subdomain to a third-party service like Shopify or GitHub Pages.
- Important: You cannot use a CNAME on the root domain itself (the "CNAME flattening" feature on some DNS providers works around this).
MX Record (Mail Exchanger)
MX records tell email servers where to deliver mail sent to your domain. Without correct MX records, you won't receive any email.
- Example:
yourdomain.com MX 10 mail.yourdomain.com - Priority value: Lower numbers = higher priority. You can have multiple MX records for redundancy.
- Use case: Setting up Google Workspace, Microsoft 365, or any custom email provider.
TXT Record (Text Record)
TXT records hold arbitrary text data and are widely used for domain verification and email security.
- SPF: Specifies which mail servers are allowed to send email on your behalf.
- DKIM: Provides a cryptographic signature to verify email authenticity.
- DMARC: Sets a policy for how receivers handle emails that fail SPF/DKIM checks.
- Domain verification: Google, Microsoft, and others ask you to add a TXT record to prove you own the domain.
NS Record (Nameserver Record)
NS records specify which DNS servers are authoritative for your domain. These are set at your domain registrar and point to wherever your DNS zone is hosted (e.g., Cloudflare, your hosting provider).
SOA Record (Start of Authority)
The SOA record contains administrative information about your DNS zone — the primary nameserver, the admin email, and timing parameters for zone transfers. This is usually managed automatically by your DNS provider.
DNS Record Quick Reference
| Record Type | Purpose | Points To |
|---|---|---|
| A | Website / server | IPv4 address |
| AAAA | Website / server (IPv6) | IPv6 address |
| CNAME | Alias / redirect | Another hostname |
| MX | Email delivery | Mail server hostname |
| TXT | Verification & email security | Text string |
| NS | Authoritative nameservers | Nameserver hostnames |
| SOA | Zone administration | Admin data |
What Is DNS Propagation?
When you change a DNS record, it doesn't update instantly worldwide. DNS servers cache records for a duration set by the TTL (Time To Live) value. Changes can take anywhere from a few minutes to 48 hours to propagate globally, depending on the TTL. Tools like whatsmydns.net let you check propagation status from multiple locations around the world.