Skip to content
Log In Sign Up info@muvcloud.com

The Common Types

TypePurposeExample value
AIPv4 address203.0.113.10
AAAAIPv6 address2001:db8::10
CNAMEAlias of another nameexample.com.
MXMail server, with priority10 mail.example.com.
TXTText, such as SPF"v=spf1 mx -all"
NSName servers of the zonens1.example.com.
SOAZone detailsSee below
PTRName for an IP addressserver1.example.com.
SRVHost and port of a service10 5 5060 sip.example.com.
CAAWhich CAs may issue0 issue "letsencrypt.org"

The trailing dot marks a full name. Without it, many DNS editors and zone files append the zone name. You can query each type with dig, for example dig example.com MX +noall +answer.

A and AAAA

An A record points a name to an IPv4 address and an AAAA record to an IPv6 address. A name can have several of each; clients pick one. Add an AAAA record only when the server really answers on IPv6, as described in how to configure IPv6 on a Linux server; a broken AAAA record makes the site slow or unreachable for IPv6 users.

CNAME Rules

  • Nothing else at that name: a name with a CNAME cannot have any other record, not even MX or TXT.
  • Not at the zone apex: example.com itself has NS and SOA records, so it cannot be a CNAME. Some DNS services offer a flattened CNAME or ALIAS record for the apex instead.
  • No MX or NS targets: MX and NS records must point to a name with A or AAAA records, not to a CNAME.

A typical use is www.example.com as a CNAME of example.com.

MX and Priority

An MX record has a priority number and a host name. Sending servers try the lowest number first and fall back to higher numbers. Two records with the same number share the load. The target must be a host name, never an IP address.

TXT: SPF, DKIM, and DMARC

  • SPF: a TXT record at the domain that lists which servers may send its mail, such as v=spf1 mx -all. A domain has one SPF record.
  • DKIM: a public key in a TXT record at a name like selector._domainkey.example.com, used to check message signatures.
  • DMARC: a policy at _dmarc.example.com, such as v=DMARC1; p=quarantine, telling receivers what to do when SPF and DKIM fail.

TXT records also prove domain ownership to outside services. For mail sent from a server, see how to send email from the Linux command line.

NS and SOA

NS records list the name servers that hold the zone; they must match the delegation at the registrar. The SOA record holds the zone's settings:

example.com. 3600 IN SOA ns1.example.com. hostmaster.example.com. (
    2026112801 ; serial
    7200       ; refresh
    3600       ; retry
    1209600    ; expire
    3600 )     ; negative caching TTL

The first name is the primary name server. The second is the responsible person's mailbox, written with a dot where the at sign would be: hostmaster.example.com. stands for the hostmaster mailbox at example.com. The serial must rise with every change so secondary servers fetch the new zone. The last value limits how long resolvers cache a "no such name" or "no record of that type" answer: under RFC 2308 they use the lower of this value and the SOA record's own TTL.

PTR, SRV, and CAA

  • PTR: maps an address back to a name; it lives in a reverse zone set by whoever controls the IP. See what is reverse DNS.
  • SRV: at a name like _sip._tcp.example.com, gives priority, weight, port, and host for a service.
  • CAA: lists the certificate authorities allowed to issue certificates for the domain. Authorities look at the name and then at its parent domains; if none has a CAA record, CAA does not restrict issuance.

TTL

Every record has a TTL, the number of seconds resolvers may cache it. A long TTL, such as 3600 or 86400, means fewer queries but slow changes. Before you move a site, lower the TTL to about 300 at least one old TTL ahead of the change, then raise it again afterward. Caches that already hold the record keep it until their copy expires; see how to flush the DNS cache in Linux.

Updated:

Linux VPS with Full Root Access

MUVCloud cloud servers run on KVM with Enterprise NVMe SSD storage and full root access, in Turkey, the Netherlands, and the USA.

Cloud VPS Plans Starting at2.99 $/mo Cheap Linux VPS

No Limits on Service or Support

You are not on your own as your projects grow. Our support engineers are ready 24/7, on several channels, whenever you need them.

Support specialist
  • 100% customer satisfaction goal
  • Our own hardware
  • 24/7 ticket and email support
  • 4 countries with locations