What Are DNS Records?
DNS records are entries stored on authoritative DNS servers that tell the internet how to handle a domain. Type a web address into your browser and your computer queries DNS to turn that human-readable name into the IP addresses and settings needed to reach the right server.
DNS is basically the internet's address book. A phone book maps a name to a number; DNS maps a domain name to IP addresses and other routing details. Without it you would have to remember a numeric IP for every site you visit.
Each record type does one job. Knowing them is worth it for anyone running a website, setting up email, or chasing down a connectivity problem. You can check any domain's records with our free DNS lookup tool.
A Records (Address Records)
The A record is the most basic type. It maps a domain name to an IPv4 address. When someone visits your site, the browser looks up the A record to find which server to connect to.
For example, an A record might map example.com to 93.184.216.34. You can have several A records for one domain pointing at different IPs, which is a common way to spread load across servers.
The IPv6 version is the AAAA record (a "quad-A" record), which maps a domain to a 128-bit IPv6 address instead of a 32-bit IPv4 one.
When You Need A Records
- Pointing your domain at your web host
- Spreading load across several servers
- Making subdomains that point at specific IPs
MX Records (Mail Exchange Records)
MX records say which mail servers handle email for your domain. When someone emails [email protected], the sending server looks up the MX records for yourdomain.com to find where to deliver the message.
MX records carry a priority value (also called preference). Lower numbers mean higher priority. With several MX records, senders try the highest-priority server first and fall back to the others if it is down.
A typical setup looks like this:
- Priority 10:
mail1.yourdomain.com(primary mail server) - Priority 20:
mail2.yourdomain.com(backup mail server)
No MX records means the domain cannot receive email. That is one of the checks during email validation, confirming an address is at least potentially deliverable.
CNAME Records (Canonical Name Records)
A CNAME record makes one name an alias for another. Instead of pointing at an IP directly, it points at another domain name, and the resolver follows the chain to the final IP.
CNAMEs are common for subdomains. You might map www.example.com to example.com, or blog.example.com to a hosted blog platform.
There are rules. You cannot put a CNAME at the zone apex (the bare domain like example.com). And a CNAME has to be the only record at that name, so you cannot run a CNAME alongside an MX or TXT record for the same hostname.
TXT Records (Text Records)
TXT records hold arbitrary text tied to a domain. They were meant for human-readable notes, but they have become central to domain verification and email security. Most TXT records now are read by machines, not people.
Common Uses of TXT Records
- Domain verification. Google Workspace, Microsoft 365, and many SaaS tools ask you to add a specific TXT record to prove you own the domain.
- SPF records. Sender Policy Framework records live in TXT records (more on this below).
- DKIM signatures. DomainKeys Identified Mail public keys are published as TXT records.
- DMARC policies. Domain-based Message Authentication policies are TXT records.
- Site verification. Search consoles and analytics tools use TXT records to confirm ownership.
NS Records (Name Server Records)
NS records name the DNS servers that are authoritative for a domain. When a resolver needs your records, it first finds the NS records to know which servers hold the real answers.
Usually your registrar or DNS host sets these for you. Most setups have at least two NS records for redundancy. If you move DNS providers, say from your registrar to Cloudflare, you update the NS records to point at the new name servers.
SPF Records (Sender Policy Framework)
SPF records list which mail servers are allowed to send email for your domain. They live in TXT records with a format that starts with v=spf1.
An SPF record might read: v=spf1 include:_spf.google.com include:sendgrid.net -all
That tells receiving servers Google's and SendGrid's servers may send mail for this domain, and everything else should be rejected (-all). Without an SPF record, a spammer can forge your domain in the From line of their spam.
SPF is one of the three parts of email authentication, alongside DKIM and DMARC. Together they make it much harder to impersonate your domain, and they help your own mail reach the inbox.
DMARC Records
DMARC (Domain-based Message Authentication, Reporting, and Conformance) sits on top of SPF and DKIM and lets a domain owner decide what happens when authentication fails. A DMARC record is a TXT record published at _dmarc.yourdomain.com.
It sets three things:
- Policy. What to do with mail that fails:
none(just watch),quarantine(send to spam), orreject(block it). - Reporting. Where to send the aggregate reports, so you can see who is sending mail as your domain.
- Alignment. How strictly the From address has to match the domains that SPF and DKIM authenticated.
The safe path is to start at p=none, read the reports, and only move to p=reject once you trust your setup. Jumping straight to reject can block your own legitimate mail if SPF or DKIM is not right yet.
Other Important Record Types
SOA Records (Start of Authority)
Every DNS zone has exactly one SOA record. It holds administrative details for the zone: the primary name server, the administrator's email, the zone serial number, and the timing values for transfers and caching.
SRV Records (Service Records)
SRV records give the hostname and port for a specific service. They show up with protocols like SIP (VoIP), XMPP (messaging), and Microsoft Active Directory.
CAA Records (Certification Authority Authorization)
CAA records name which certificate authorities are allowed to issue SSL/TLS certificates for your domain, which stops an unauthorized CA from issuing a certificate that could be used to intercept traffic.
How to Check DNS Records
You can view any domain's records with our DNS lookup tool. Enter a domain to see its A, MX, CNAME, TXT, NS, and other records. Handy for chasing email delivery problems, confirming your own config, or checking how another domain is set up.
If you live on the command line, dig and nslookup give you more detailed queries. For a quick check, a web tool is faster and needs no terminal.
Knowing your DNS records is basic to running anything online. Setting up a site, configuring business email, debugging a connection, it all goes faster when you know what each record does, and it saves you from expensive misconfigurations. If you want help setting up or cleaning up your DNS, our cloud solutions team can make sure the infrastructure is configured correctly and locked down.