The Domain Name System (DNS) uses various record types to map human-readable hostnames to different types of network data.
Common DNS Records
- A Record: Maps a hostname to an IPv4 address. Example:
server.example.com → 192.0.2.10 - AAAA Record: Maps a hostname to an IPv6 address. Example:
server.example.com → 2001:db8::10 - CNAME (Canonical Name): Aliases one DNS name to another DNS name, not directly to an IP address. Useful when multiple services point to the same host.
- MX (Mail Exchange): Directs email to a mail server. Contains a preference value for priority routing.
- PTR (Pointer): Used for reverse lookups, mapping an IP address back to a hostname.
- TXT (Text): Holds text-based data, frequently used for verification and email security policies like SPF, DKIM, and DMARC.
- NS (Name Server): Delegates a DNS zone to use specific authoritative name servers.
- SOA (Start of Authority): Contains administrative information about the zone, including primary name server, email of the administrator, and serial numbers.
SRV (Service) Records
An SRV record is used for service discovery. It points to a specific service and includes the service name, protocol, priority, weight, port, and target hostname. At a conceptual level, Active Directory relies heavily on SRV records so domain-joined clients can locate Domain Controllers, Global Catalogs, and LDAP services automatically.
Querying Specific Records
When performing DNS troubleshooting, you can query specific record types using command-line tools. Verify exact syntax for your OS version.
Windows (PowerShell):
Resolve-DnsName example.com -Type MX
Windows / Linux (nslookup):
nslookup -type=mx example.com