Complete guide to DNS record types

Introduction

DNS (Domain Name System) records are instructions stored in authoritative DNS servers that provide information about a domain. Each record type serves a specific purpose. This guide explains the most common DNS record types and when to use them.

A record (Address)

Maps a domain name to an IPv4 address.

Host Type Value Example use
@ A 203.0.113.10 Point your domain to your server
www A 203.0.113.10 Point www.yourdomain.com to your server

AAAA record (IPv6 Address)

Same as an A record, but maps a domain name to an IPv6 address.

Host Type Value Example use
@ AAAA 2001:0db8:85a3::8a2e:0370:7334 Point your domain to an IPv6-enabled server

CNAME record (Canonical Name)

Creates an alias that points one domain name to another. The target must be a domain name, not an IP address.

Host Type Value Example use
www CNAME yourdomain.com Make www resolve to the same place as the root domain
blog CNAME mysite.wordpress.com Point a subdomain to an external service

Important: A CNAME record cannot coexist with other record types for the same hostname. You cannot set a CNAME on the root domain (@) if you also have MX or TXT records there.

MX record (Mail Exchange)

Specifies which mail server(s) should receive email for your domain. The priority value determines the order in which servers are tried (lower number = higher priority).

Host Type Value Priority Example use
@ MX mail.yourdomain.com 10 Primary mail server
@ MX backup.yourdomain.com 20 Backup mail server

TXT record (Text)

Stores arbitrary text data. Commonly used for domain verification and email authentication.

Common uses

Purpose Host Example value
SPF (email auth) @ v=spf1 include:_spf.google.com ~all
DMARC _dmarc v=DMARC1; p=reject; rua=mailto:dmarc@yourdomain.com
Domain verification @ google-site-verification=abc123...
DKIM selector._domainkey v=DKIM1; k=rsa; p=MIIBIjANBg...

SRV record (Service)

Specifies the hostname and port for specific services. Used by protocols like SIP, XMPP, and Microsoft 365.

Format Example
_service._protocol.name _sip._tcp.yourdomain.com

The value includes priority, weight, port, and target: 10 5 5060 sipserver.yourdomain.com

NS record (Name Server)

Delegates a domain or subdomain to a set of DNS servers. These records determine which servers are authoritative for your domain.

Host Type Value Example use
@ NS ns1.yourhostingprovider.com Set your domain's name servers

Important: Changing NS records at your registrar redirects all DNS queries for your domain. Only modify these if you are intentionally changing DNS providers.

PTR record (Pointer / Reverse DNS)

Maps an IP address back to a domain name (the reverse of an A record). PTR records are essential for email deliverability — many mail servers reject email from IPs without a valid reverse DNS entry.

PTR records are typically managed by your hosting or IP provider, not in your domain's DNS zone.

CAA record (Certification Authority Authorization)

Specifies which certificate authorities (CAs) are allowed to issue SSL/TLS certificates for your domain.

Host Type Value Example use
@ CAA 0 issue "letsencrypt.org" Only allow Let's Encrypt to issue certificates

Quick reference

Record Purpose Points to
A Domain → IPv4 IP address
AAAA Domain → IPv6 IPv6 address
CNAME Alias → another domain Domain name
MX Email routing Mail server hostname
TXT Text data (SPF, DKIM, verification) Text string
SRV Service location Host + port
NS DNS delegation Name server hostname
PTR Reverse DNS (IP → domain) Domain name
CAA CA authorization CA domain