Below is a summary of the major types of records within a DNS configuration, along with their purposes and examples of their content.
Summary of Major DNS Record Types
DNS configuration files contain various record types that direct internet traffic by mapping domain names to specific resources or data. Each type serves a unique function, ensuring websites, emails, and other services work correctly. Below are the primary DNS record types, their purposes, and examples of their content.
A (Address) Record
- Purpose: Maps a domain name to an IPv4 address, directing traffic to a specific server.
- Content: Contains the 32-bit IPv4 address of the host.
- Example:
example.com. 3600 IN A 192.0.2.1
- This points
example.com
to the IP address192.0.2.1
with a TTL (time to live) of 3600 seconds.
- This points
AAAA (Quad-A) Record
- Purpose: Maps a domain name to an IPv6 address, supporting newer internet protocols.
- Content: Contains the 128-bit IPv6 address.
- Example:
example.com. 3600 IN AAAA 2001:0db8:85a3:0000:0000:8a2e:0370:7334
- This directs
example.com
to the IPv6 address shown.
- This directs
CNAME (Canonical Name) Record
- Purpose: Aliases one domain name to another, pointing to the “true” domain name.
- Content: Specifies the target domain name (not an IP address).
- Example:
www.example.com. 3600 IN CNAME example.com.
- This makes
www.example.com
resolve to the same IP asexample.com
.
- This makes
MX (Mail Exchange) Record
- Purpose: Directs email to the correct mail server for a domain.
- Content: Lists the mail server’s hostname and a priority number (lower means preferred).
- Example:
example.com. 3600 IN MX 10 mail.example.com.
- This routes email for
example.com
tomail.example.com
with priority 10.
- This routes email for
NS (Name Server) Record
- Purpose: Identifies the authoritative DNS servers for a domain.
- Content: Contains the hostname of the DNS server.
- Example:
example.com. 3600 IN NS ns1.example.com.
- This states that
ns1.example.com
is a name server forexample.com
.
- This states that
TXT (Text) Record
- Purpose: Stores descriptive or verification data, often for security or configuration.
- Content: Holds arbitrary text, like verification codes or policy settings.
- Example:
example.com. 3600 IN TXT "v=spf1 mx -all"
- This defines an SPF (Sender Policy Framework) rule to prevent email spoofing.
SOA (Start of Authority) Record
- Purpose: Provides key details about the domain’s DNS zone, like the primary name server and admin contact.
- Content: Includes fields like the primary name server, admin email, serial number, and timers for refresh/retry/expire.
- Example:
example.com. 3600 IN SOA ns1.example.com. admin.example.com. 2025082101 7200 3600 1209600 3600
- This specifies
ns1.example.com
as the primary server,admin.example.com
as the contact, with a serial number and timing values.
- This specifies
PTR (Pointer) Record
- Purpose: Maps an IP address back to a domain name, used for reverse DNS lookups.
- Content: Contains the domain name associated with the IP.
- Example:
1.2.0.192.in-addr.arpa. 3600 IN PTR example.com.
- This links the IP
192.0.2.1
toexample.com
for reverse lookups.
- This links the IP
SRV (Service) Record
- Purpose: Defines the location (host and port) of specific services, like VoIP or messaging.
- Content: Includes priority, weight, port, and target hostname.
- Example:
_sip._tcp.example.com. 3600 IN SRV 10 60 5060 sipserver.example.com.
- This directs SIP traffic for
example.com
tosipserver.example.com
on port 5060.
- This directs SIP traffic for
CAA (Certification Authority Authorization) Record
- Purpose: Specifies which certificate authorities can issue SSL/TLS certificates for the domain.
- Content: Lists the CA’s domain and flags for constraints.
- Example:
example.com. 3600 IN CAA 0 issue "letsencrypt.org"
- This allows only Let’s Encrypt to issue certificates for
example.com
.
- This allows only Let’s Encrypt to issue certificates for
DNAME (Delegation Name) Record
- Purpose: Creates an alias for an entire subdomain, redirecting all its queries to another domain.
- Content: Specifies the target domain name that the subdomain maps to.
- Example:
sub.example.com. 3600 IN DNAME target.com.
- This redirects all queries for
sub.example.com
and its subdomains (e.g.,app.sub.example.com
) totarget.com
equivalents.
- This redirects all queries for
DS (Delegation Signer) Record
- Purpose: Supports DNSSEC by linking a parent zone to a child zone’s cryptographic key, ensuring secure delegation.
- Content: Contains a key tag, algorithm number, digest type, and a hash of a DNSKEY record.
- Example:
example.com. 3600 IN DS 12345 8 2 1A2B3C4D5E6F7A8B9C0D1E2F3A4B5C6D7E8F9A0B
- This verifies the DNSKEY for
example.com
using algorithm 8 and SHA-256 digest.
- This verifies the DNSKEY for
Notes
- TTL (Time to Live): Most records include a TTL (in seconds), indicating how long resolvers cache the data.
- Format: Records follow a standard structure:
name TTL IN type data
. - Use Cases: These records support everything from website hosting (A, AAAA) to email delivery (MX) and security (TXT, CAA).
- Management: Proper change management, as discussed previously, ensures these records are updated accurately to avoid errors.
This summary covers the most common DNS record types, their roles, and example content, making it easier to understand their function in a DNS configuration. For a deeper look or hands-on setup, consider exploring a demo of the DNS change management application integrated into ResorsIT!
All of the record types are defined in various Request for Comment (RFC) specifications. (RFC specs define the standards for the Internet).