DNS Record Types Explained

DNS records are instructions stored on DNS servers that provide information about a domain. Different record types serve different purposes — from pointing a domain to an IP address to configuring email delivery. This guide covers all the essential DNS record types you need to know.

A and AAAA Records

A Record (Address Record)

The A record is the most fundamental DNS record type. It maps a domain name to an IPv4 address.

# Example A Record
example.com.    300    IN    A    192.0.2.1

# Multiple A records for load balancing
example.com.    300    IN    A    192.0.2.1
example.com.    300    IN    A    192.0.2.2

Common uses:

AAAA Record (IPv6 Address Record)

The AAAA record (pronounced "quad-A") is the IPv6 equivalent of the A record.

# Example AAAA Record
example.com.    300    IN    AAAA    2001:db8::1
lightbulb Best Practice

If your server supports IPv6, add both A and AAAA records. This enables dual-stack connectivity, allowing users to connect via whichever protocol works best for them.

CNAME Records

A CNAME record (Canonical Name) creates an alias from one domain name to another. Instead of pointing to an IP address, it points to another domain name.

# Example CNAME Record
www.example.com.    300    IN    CNAME    example.com.
blog.example.com.   300    IN    CNAME    myblog.wordpress.com.

Common uses:

warning CNAME Restrictions

You cannot create a CNAME record at the root/apex of your domain (e.g., example.com). CNAME records also cannot coexist with other record types for the same name. Some DNS providers offer "ALIAS" or "ANAME" records as a workaround.

MX Records

MX records (Mail Exchange) specify the mail servers responsible for receiving email for your domain.

# Example MX Records
example.com.    300    IN    MX    10 mail1.example.com.
example.com.    300    IN    MX    20 mail2.example.com.
example.com.    300    IN    MX    30 mail.backup.com.

The number before the server name is the priority. Lower numbers have higher priority. Email is attempted to the lowest priority server first, then falls back to higher numbers if the primary fails.

Common MX Configurations

Provider MX Records
Google Workspace 1 ASPMX.L.GOOGLE.COM
5 ALT1.ASPMX.L.GOOGLE.COM
Microsoft 365 0 yourdomain-com.mail.protection.outlook.com
Zoho Mail 10 mx.zoho.com
20 mx2.zoho.com

TXT Records

TXT records store arbitrary text data. Originally intended for human-readable notes, they're now primarily used for verification and email security.

# Domain verification
example.com.    300    IN    TXT    "google-site-verification=abc123..."

# SPF record for email authentication
example.com.    300    IN    TXT    "v=spf1 include:_spf.google.com ~all"

# DKIM record
selector._domainkey.example.com.    300    IN    TXT    "v=DKIM1; k=rsa; p=MIGfMA0..."

# DMARC record
_dmarc.example.com.    300    IN    TXT    "v=DMARC1; p=reject; rua=mailto:dmarc@example.com"

Common uses:

NS Records

NS records (Name Server) delegate a domain or subdomain to a set of authoritative DNS servers.

# Example NS Records
example.com.    86400    IN    NS    ns1.dnsprovider.com.
example.com.    86400    IN    NS    ns2.dnsprovider.com.

# Delegating a subdomain to different nameservers
api.example.com.    86400    IN    NS    ns1.apihost.com.

NS records at your domain registrar determine which DNS servers are authoritative for your domain.

SOA Records

The SOA record (Start of Authority) contains administrative information about the domain, including the primary nameserver and zone refresh timing.

# Example SOA Record
example.com.    86400    IN    SOA    ns1.example.com. admin.example.com. (
                        2024011501  ; Serial
                        7200        ; Refresh (2 hours)
                        3600        ; Retry (1 hour)
                        1209600     ; Expire (2 weeks)
                        3600        ; Minimum TTL (1 hour)
                        )

SOA records are typically managed automatically by your DNS provider.

Other Record Types

SRV Records (Service)

Specifies the location of services. Commonly used for SIP, XMPP, and Microsoft services.

_sip._tcp.example.com.    300    IN    SRV    10 60 5060 sip.example.com.

CAA Records (Certification Authority Authorization)

Specifies which Certificate Authorities can issue SSL certificates for your domain.

example.com.    300    IN    CAA    0 issue "letsencrypt.org"
example.com.    300    IN    CAA    0 issue "digicert.com"

PTR Records (Pointer)

Used for reverse DNS lookups — mapping an IP address to a domain name. Typically configured by your hosting provider.

1.2.0.192.in-addr.arpa.    300    IN    PTR    mail.example.com.

Quick Reference Table

Record Purpose Points To
A Domain to IPv4 IPv4 address
AAAA Domain to IPv6 IPv6 address
CNAME Alias Another domain
MX Email routing Mail server domain
TXT Text data Arbitrary text
NS Delegation Nameserver domain
SOA Zone info Administrative data
SRV Service location Service host/port
CAA SSL CA authorization CA domain
PTR Reverse DNS Domain name

Look Up DNS Records

Use our DNS lookup tool to check the DNS records for any domain.

search DNS Lookup Tool