What Are DNS Record Types?

Share This Article

Updated on July 22, 2025

DNS record types are the building blocks of internet communication. They determine how domain names connect to IP addresses, where emails get delivered, and how services find their destinations across the web.

Understanding these record types is essential for anyone managing domain names, web services, or network infrastructure. Each record type serves a specific purpose within the Domain Name System (DNS), from basic website accessibility to complex service configurations.

This guide covers the most important DNS record types you’ll encounter in your daily work. You’ll learn what each record does, how to format it correctly, and when to use it in real-world scenarios.

Definition and Core Concepts

DNS record types are standardized data entries within a DNS zone file that provide specific information about a domain name. Each record type serves a unique purpose in directing internet traffic, verifying ownership, or providing service locations.

DNS (Domain Name System)

The hierarchical and distributed naming system that translates human-readable domain names into IP addresses. DNS operates through a network of servers that store and share information about domain names and their associated resources.

DNS Zone File

A text file containing all the DNS records for a specific domain. Zone files define how DNS queries for that domain should be resolved and what information should be returned to requesting clients.

Resource Record (RR)

The general term for an entry in a zone file. Each resource record contains specific information about a domain or subdomain, formatted according to DNS standards.

Name Server (Authoritative)

The server responsible for a zone. Authoritative name servers contain the definitive DNS records for their assigned domains and respond to queries with official information.

DNS Resolver

The client-side component that queries DNS servers. Resolvers receive requests from applications and work through the DNS hierarchy to find the requested information.

Time-to-Live (TTL)

The duration for which a record is cached by resolvers. TTL values determine how long DNS information remains valid before requiring a fresh query to the authoritative server.

Common DNS Record Types

A Record (Address Record)

The A record maps a domain name or hostname to an IPv4 address. This is the most fundamental record type for website accessibility, directly connecting domain names to their server locations.

Syntax Example: example.com IN A 192.0.2.1

Use Cases: Connecting a website to its server’s IPv4 address. Every website that uses IPv4 requires at least one A record to function properly.

AAAA Record (IPv6 Address Record)

The AAAA record maps a domain name or hostname to an IPv6 address. It serves as the IPv6 equivalent of an A record, enabling connectivity over modern IPv6 networks.

Syntax Example: example.com IN AAAA 2001:0db8::1

Use Cases: Enabling websites and services to be accessible over IPv6 networks. As IPv6 adoption increases, AAAA records become essential for ensuring complete network compatibility.

CNAME Record (Canonical Name Record)

The CNAME record maps an alias or subdomain to another domain name rather than directly to an IP address. It creates an alias that points to the canonical (true) name of a resource.

Syntax Example: www.example.com IN CNAME example.com

Use Cases: Pointing multiple subdomains to the same primary domain, simplifying management. Common examples include redirecting www.example.com to example.com or pointing blog.example.com to the main site.

Key Restrictions: CNAME records cannot be used at the root domain level. They also cannot coexist with other record types (like MX or A records) for the same alias, with some DNSSEC exceptions.

MX Record (Mail Exchange Record)

The MX record specifies the mail servers responsible for accepting email messages on behalf of a domain name. It includes a priority value to indicate preference, with lower numbers representing higher priority.

Syntax Example: example.com IN MX 10 mail.example.com

Use Cases: Directing email traffic to the correct mail server for a domain. MX records are essential for email delivery and allow organizations to specify multiple mail servers for redundancy.

NS Record (Name Server Record)

The NS record delegates a domain or subdomain to a specific authoritative DNS name server. It tells DNS resolvers which servers are authoritative for a particular zone.

Syntax Example: example.com IN NS ns1.exampledns.com

Use Cases: Delegating DNS management for a domain to specific name servers. This enables redundancy and distributed management while allowing organizations to use different DNS providers.

PTR Record (Pointer Record)

The PTR record performs reverse DNS lookups, mapping an IP address back to a domain name. This is the opposite function of A and AAAA records.

Syntax Example: 1.2.0.192.in-addr.arpa IN PTR host.example.com

Use Cases: Email validation for anti-spam measures, network troubleshooting, and logging systems that display hostnames instead of IP addresses. Many email systems check PTR records to verify sender legitimacy.

Special Zone: PTR records exist in a special “reverse DNS” zone, such as in-addr.arpa for IPv4 addresses and ip6.arpa for IPv6 addresses.

SRV Record (Service Record)

The SRV record specifies the location (hostname and port number) of servers for specific services. It includes priority, weight, port, and target fields to provide detailed service information.

Syntax Example: _sip._tcp.example.com IN SRV 0 0 5060 sipserver.example.com

Use Cases: Configuring Voice over Internet Protocol (VoIP) systems, instant messaging services, and other applications that require clients to find specific server instances and port numbers. SRV records enable service discovery and load balancing.

TXT Record (Text Record)

The TXT record allows domain administrators to store arbitrary text information in the DNS. This flexibility makes TXT records useful for various administrative and verification purposes.

Syntax Example: example.com IN TXT “v=spf1 include:_spf.google.com ~all”

Use Cases: Domain ownership verification, email security implementations (SPF, DKIM, DMARC), and storing administrative notes. TXT records are commonly used by third-party services to verify domain control.

Other Important Record Types

SOA Record (Start of Authority Record)

Provides administrative information about the DNS zone, including the primary name server, administrator email, serial number, and refresh timers. Every DNS zone must contain exactly one SOA record.

DNSSEC Records

Records like RRSIG, NSEC, and DS cryptographically sign DNS records to enhance security against spoofing and tampering. These records are essential for implementing DNS Security Extensions.

Key Terms Appendix

  • DNS (Domain Name System): The hierarchical and distributed naming system for the internet that translates domain names to IP addresses.
  • DNS Zone File: A text-based database containing all DNS records for a specific domain.
  • Resource Record (RR): A general term for an entry in a DNS zone file.
  • Domain Name: A human-readable name identifying a website or network resource.
  • IP Address: A numerical address identifying a device on a network.
  • Hostname: A label assigned to a device connected to a computer network.
  • Canonical Name: The primary or true domain name that an alias points to.
  • Priority: A value indicating preference for one record over others in MX or SRV records.
  • Weight: A value used in SRV records to distribute load among servers of the same priority.
  • TTL (Time-to-Live): The duration for which a DNS record is cached by resolvers.
  • Reverse DNS Lookup: The process of resolving an IP address to a domain name.
  • SPF (Sender Policy Framework): An email authentication method used to detect email spoofing.
  • DKIM (DomainKeys Identified Mail): An email authentication method using cryptographic signatures to verify sender identity.
  • DMARC (Domain-based Message Authentication, Reporting & Conformance): An email authentication protocol that builds on SPF and DKIM.
  • VoIP (Voice over IP): Voice communication transmitted over IP networks.

Continue Learning with our Newsletter