The DevOps Drop
Home / Topics / DNS / DNS Records Explained: A, AAAA, CNAME, MX, TXT and More

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

DNS records are the building blocks that tell the internet how to route traffic, deliver email, and verify services. Learn how A, AAAA, CNAME, MX, TXT, NS, and other DNS records work with practical examples.

Published 15 Jul 2026 · 5 min read

Lights simulating data flow

What Are DNS Records?

DNS records are instructions stored on DNS servers that tell the internet how a domain should behave. They connect human-readable domain names like example.com to the services and servers that power them.

When someone visits a website, sends an email, or verifies ownership of a domain, DNS records provide the information needed to complete that request.

A DNS record is made up of several important parts:

Type    Name              Value              TTL

A       example.com       192.0.2.10         3600
  • Type - The kind of DNS record.

  • Name - The domain or subdomain the record applies to.

  • Value - The destination or information stored in the record.

  • TTL - How long DNS resolvers should cache the result.

Why Are DNS Records Important?

DNS records are responsible for much more than simply pointing a domain to a website. They are used for:

  • Directing website traffic to servers

  • Routing email to mail providers

  • Verifying domain ownership

  • Configuring security features

  • Connecting services and infrastructure

For DevOps engineers, understanding DNS records is essential when deploying applications, configuring cloud services, and troubleshooting connectivity problems.

A Records

An A record maps a domain name to an IPv4 address.

For example:

example.com → 192.0.2.10

When a user visits example.com, the DNS resolver can use this record to find the server hosting the website.

A typical website might have:

Type: A
Name: example.com
Value: 203.0.113.25
TTL: 3600

AAAA Records

AAAA records perform the same role as A records but point to IPv6 addresses instead of IPv4.

example.com → 2001:db8::10

As IPv6 adoption increases, AAAA records are becoming more common alongside traditional A records.

CNAME Records

A CNAME (Canonical Name) record creates an alias from one domain name to another.

Instead of pointing directly to an IP address, it points to another hostname.

www.example.com → example.com

A common use case is pointing a subdomain towards a managed service:

blog.example.com → hosting-provider.example.net

CNAME records are useful because the destination can change without updating every domain that references it.

MX Records

MX (Mail Exchange) records tell email servers where to deliver messages for a domain.

For example:

example.com → mail.example.com

A domain can have multiple MX records with different priorities.

Priority   Server

10         mail1.example.com
20         mail2.example.com

If the highest priority mail server is unavailable, another server can accept incoming email.

TXT Records

TXT records store arbitrary text information associated with a domain.

They are commonly used for verification and security purposes.

Common uses include:

  • Email authentication

  • Domain ownership verification

  • Service configuration

Example SPF record:

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

Services such as Google Workspace, Microsoft 365, and GitHub often require TXT records to verify that you control a domain.

NS Records

NS (Name Server) records define which DNS servers are responsible for managing a domain.

For example:

example.com

ns1.example-dns.com
ns2.example-dns.com

When a DNS resolver needs information about a domain, it follows the NS records to find the authoritative DNS servers.

SOA Records

The SOA (Start of Authority) record contains important information about a DNS zone.

It includes details such as:

  • The primary authoritative DNS server

  • The domain administrator

  • Zone version information

  • DNS refresh settings

Every DNS zone has an SOA record.

SRV Records

SRV records define the location of specific services.

They are commonly used for applications that need to discover services automatically.

_service._protocol.example.com

Examples include:

  • Voice and video applications

  • Messaging systems

  • Enterprise services

How To Check DNS Records

The dig command is one of the most useful tools for inspecting DNS records.

dig example.com

You can request specific record types:

dig example.com A

dig example.com MX

dig example.com TXT

dig example.com NS

The output shows the DNS response returned by the authoritative servers.

DNS Records and TTL

Every DNS record has a TTL (Time To Live) value that controls how long DNS resolvers cache the response.

TTL: 3600

A TTL of 3600 means the record can be cached for one hour before checking for an updated value.

Lower TTL values are useful when making changes because updates propagate faster. Higher TTL values reduce DNS query traffic and improve efficiency.

Common DNS Record Problems

Incorrect DNS records are a common cause of website and infrastructure issues.

  • Wrong A record: Traffic is sent to the wrong server.

  • Missing MX record: Email delivery fails.

  • Incorrect CNAME: Services cannot be reached.

  • Missing TXT record: Verification checks fail.

Tools like dig, nslookup, and online DNS checkers can help identify these issues.

Why DNS Records Matter For DevOps

DNS records are a fundamental part of modern infrastructure.

They are involved in:

  • Deploying applications behind domains

  • Configuring load balancers

  • Setting up SSL certificates

  • Managing cloud services

  • Connecting microservices

  • Routing traffic between environments

A good understanding of DNS records makes troubleshooting production systems much easier. Many issues that appear to be application failures are actually DNS configuration problems.

Conclusion

DNS records are the foundation of how the internet connects services together. While there are many different record types, each one has a specific purpose.

Understanding A, AAAA, CNAME, MX, TXT, and other DNS records gives developers and DevOps engineers the knowledge needed to build, deploy, and troubleshoot reliable infrastructure.

Related Articles

Continue exploring similar topics and guides.

A globe with markers

How DNS Actually Works

A practical introduction to DNS, explaining how domain lookups work, how DNS servers communicate, and why understanding DNS is essential for DevOps and infrastructure work.

Read article
12 Jul 2026 4 min read
Keyboard keycaps spelling out http:

Understanding HTTP Status Codes

Learn how HTTP status codes reveal what is happening between users, browsers, servers, and applications. This guide explains common 2xx, 3xx, 4xx, and 5xx responses and how DevOps engineers use them to troubleshoot real-world production issues.

Read article
13 Jul 2026 6 min read