DNS Records Explained: A, MX, CNAME, TXT, and More

DNS records control how traffic for your domain is routed: they specify where your website is hosted, where email is sent, and which external services can use your domain. In this article, we'll cover the main types of DNS records and their purposes.

A-record

Purpose: Specifies the IPv4 address to which the domain or subdomain should point.

Example:
example.com → 192.0.2.1

Used for: linking a domain to a website or server by IP.

AAAA-record

Purpose: Same as A record, but for IPv6 address.

Example:
example.com → 2001:0db8:85a3::8a2e:0370:7334

MX record

Purpose: Specifies which server email for the domain should be sent to.

Example:
example.com → mx1.mailprovider.com (priority: 10)

Important: The priority is indicated by a number - the lower the value, the higher the server priority.

CNAME record

Purpose: Redirects a domain or subdomain to another domain name.

Example:
www.example.com → example.com

Features:
used for subdomains, cannot be used for the root domain (example.com).

TXT record

Purpose: Stores text information. Often used for domain verification and email configuration (SPF, DKIM, DMARC).

Example:
v=spf1 include:_spf.google.com ~all

NS record

Purpose: Specifies which DNS servers serve the domain.

Example:
example.com → ns1.unihost.kz, ns2.unihost.kz

Changing NS records usually occurs through the registrar panel, and not in the DNS zone.

SRV record

Purpose: Used for services that require a port and protocol to be specified, such as SIP, XMPP, or Microsoft 365.

Example:
_sip._tcp.example.com → srv.example.com:5060

PTR record

Purpose: Reverse DNS record. Allows you to map an IP address to a domain name.

Configured by your IP address provider (e.g., hosting provider). Used for mail servers.

Conclusion

Understanding DNS record types allows you to more accurately manage your domain, connect your website, email, and external services. If you're unsure which record to use, contact support or check the requirements of the service you're connecting your domain to.