DNS Fundamentals: A, AAAA, CNAME, MX, TXT & NS Records Explained

DNS translates human-readable domain names into the information servers actually need — IP addresses, mail routing, and verification records. This guide explains each core record type and when to use it.

A Record

Maps a domain or subdomain to an IPv4 address.

Type: A
Name: @  (or a subdomain like "app")
Value: 203.0.113.10

This is the record you edit to point a domain at your VPS — see How to Point a Domain to Your VPS (A/AAAA Records).

AAAA Record

Same purpose as an A record, but for IPv6 addresses:

Type: AAAA
Name: @
Value: 2001:db8::1

CNAME Record

Points a subdomain to another domain name (an alias), rather than directly to an IP:

Type: CNAME
Name: www
Value: yourdomain.com

A CNAME cannot coexist with other records on the same exact name, and cannot be used at the root/apex domain in most DNS implementations — see How to Use CNAME Records Correctly.

MX Record

Specifies which mail servers handle email for your domain, and in what priority order:

Type: MX
Name: @
Priority: 10
Value: mail.yourdomain.com

Lower priority numbers are tried first. See How to Configure MX Records for Email Delivery.

TXT Record

Stores arbitrary text data, commonly used for domain verification and email authentication (SPF, DKIM, DMARC):

Type: TXT
Name: @
Value: v=spf1 ip4:203.0.113.10 -all

See How to Configure SPF, DKIM, and DMARC (Complete Guide).

NS Record

Specifies which nameservers are authoritative for your domain — these control where all other DNS records for the domain are actually managed:

Type: NS
Name: @
Value: ns1.yourdnsprovider.com

PTR Record

The reverse of an A record — maps an IP address back to a hostname. See How to Set Up Reverse DNS (PTR/rDNS) for Email Deliverability.

SRV Record

Specifies the host and port for specific services (used by protocols like SIP, XMPP):

Type: SRV
Name: _service._proto.yourdomain.com
Value: priority weight port target

CAA Record

Specifies which certificate authorities are allowed to issue SSL certificates for your domain — an additional security control against unauthorized certificate issuance:

Type: CAA
Name: @
Value: 0 issue "letsencrypt.org"

Understanding TTL (Time to Live)

TTL determines how long resolvers cache a record's value before checking again, measured in seconds. Lower TTL (e.g. 300) means faster propagation of changes but more frequent DNS lookups; higher TTL (e.g. 86400) reduces lookup load but slows change propagation.

Quick Reference Table

RecordPurpose
ADomain/subdomain → IPv4 address
AAAADomain/subdomain → IPv6 address
CNAMESubdomain → another domain name (alias)
MXMail server routing
TXTVerification, SPF, DKIM, DMARC
NSAuthoritative nameservers
PTRIP → hostname (reverse DNS)
CAARestricts which CAs can issue certificates

Checking Any Record Type

dig A yourdomain.com
dig MX yourdomain.com
dig TXT yourdomain.com
dig NS yourdomain.com

Continue Reading

Browse more articles in Networking & DNS.

  • dns records, a record, cname, mx record, dns basics
  • 0 Uživatelům pomohlo
Byla tato odpověď nápomocná?

Související články

How to Point a Domain to Your VPS (A/AAAA Records)

Before your website is reachable at yourdomain.com instead of a raw IP address, you need to...

How to Configure MX Records for Email Delivery

MX (Mail Exchange) records tell the internet which servers handle incoming email for your domain....

How to Use CNAME Records Correctly

CNAME records let you alias one domain name to another, but they come with important restrictions...

How to Configure a Static IP on a Linux VPS

Most VPS providers assign a static (unchanging) IP address by default, but understanding how...

How to Set Up a CDN in Front of Your VPS

A Content Delivery Network (CDN) caches your site's static content across globally distributed...