DNS record types: A, AAAA, CNAME, MX, TXT, SRV, CAA
A DNS record is one line in your domain's zone. The type says what kind of answer it gives. This article lists each type, with an example for example.ca.
Summary
| Type | Points a name to | Example value |
|---|---|---|
| A | An IPv4 address | 203.0.113.25 |
| AAAA | An IPv6 address | 2001:db8::25 |
| CNAME | Another name | shops.example-store.com. |
| MX | A mail server, with a priority | 10 mail.example.ca. |
| TXT | Free text | v=spf1 +a +mx ~all |
| SRV | A service host and port | 0 1 443 sipdir.online.lync.com. |
| CAA | Which certificate authorities may issue SSL | 0 issue "letsencrypt.org" |
| NS | The nameservers for the zone | gordon.barbrick.ca. |
| SOA | Zone metadata, managed for you | Set by the provider |
| PTR | An IP back to a name (reverse DNS) | Managed by the owner of the IP |
A and AAAA
Point a name to a server address.
example.ca. 3600 IN A 203.0.113.25
example.ca. 3600 IN AAAA 2001:db8::25
See A and CNAME records.
CNAME
Makes one name an alias of another. Visitors who look up the alias get the target's address.
www.example.ca. 3600 IN CNAME example.ca.
shop.example.ca. 3600 IN CNAME shops.example-store.com.
Rules:
- A CNAME cannot sit beside any other record on the same name.
- The root (
example.ca) cannot be a CNAME, because it must hold NS, SOA, and usually MX records. - The target is a name, never an IP address.
MX
Says where email for the domain goes. Lower priority numbers are tried first.
example.ca. 3600 IN MX 0 mail.example.ca.
The target must be an A record name, not a CNAME. See MX records.
TXT
Holds text. Used for SPF, DKIM, DMARC, and ownership proofs.
example.ca. 3600 IN TXT "v=spf1 +a +mx ~all"
_dmarc.example.ca. 3600 IN TXT "v=DMARC1; p=none"
You can have several TXT records on one name, but only one SPF record. See TXT records.
SRV
Locates a service by name, protocol, port, and weight. Used by Microsoft 365, Teams, and some calendars.
_sip._tls.example.ca. 3600 IN SRV 100 1 443 sipdir.online.lync.com.
Fields are priority, weight, port, and target. See SRV records.
CAA
Limits which certificate authorities can issue SSL for your domain.
example.ca. 3600 IN CAA 0 issue "letsencrypt.org"
See CAA records.
NS and SOA
NS names the nameservers. SOA holds the serial number and timers. You do not normally edit either. See Nameservers explained.
Record fields in your Barbrick account
| Field | Meaning |
|---|---|
| Name | The host. @ or the domain itself means the root. www means www.example.ca. |
| Type | The record type |
| TTL | Seconds before resolvers ask again. See TTL. |
| Value | The record's data |
The record list shows names such as www, and some providers show full names with a trailing dot, such as www.example.ca.. Either form means the same thing.
Still stuck? Ask us and we'll walk you through it.