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 3600Type - 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.10When 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: 3600AAAA Records
AAAA records perform the same role as A records but point to IPv6 addresses instead of IPv4.
example.com → 2001:db8::10As 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.comA common use case is pointing a subdomain towards a managed service:
blog.example.com → hosting-provider.example.netCNAME 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.comA domain can have multiple MX records with different priorities.
Priority Server
10 mail1.example.com
20 mail2.example.comIf 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 ~allServices 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.comWhen 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.comExamples 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.comYou can request specific record types:
dig example.com A
dig example.com MX
dig example.com TXT
dig example.com NSThe 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: 3600A 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.