DevOps

DNS Record Types Cheatsheet

Comprehensive DNS record types reference covering address records, mail servers, name servers, text records, and advanced DNS configurations.

#dns #networking #domain #nameserver #records #infrastructure
Sign In to Download

Free account required

i

DNS Record Syntax

DNS (Domain Name System) records are essential for internet infrastructure. Learn how DNS works in our comprehensive guide, or explore DNS server types. Test your DNS configuration with our DNS Lookup tool and ensure email deliverability with SPF and DMARC checkers. Monitor your infrastructure on our dashboard.

example.com.    3600    IN    A    192.0.2.1
Name
Domain/Subdomain
TTL
Time to Live (seconds)
Class
IN (Internet)
Type
A, AAAA, CNAME, etc.
Data
Record value

Common DNS Record Types

A

A (Address) Record

IPv4 Address Mapping

Maps a fully qualified domain name (FQDN) to an IPv4 address. This is the most commonly used DNS record type. Test A records with our DNS Lookup tool or check domain ownership with WHOIS.

Syntax:
example.com. 3600 IN A 192.0.2.1
Use Case: Point domain names to web servers, mail servers, or any IPv4 address.
AAAA

AAAA (Quad A) Record

IPv6 Address Mapping

Maps a domain name to an IPv6 address. The IPv6 version of the A record. Test IPv6 connectivity with our DNS Lookup tool.

Syntax:
example.com. 3600 IN AAAA 2001:0db8:85a3::8a2e:0370:7334
Use Case: Support modern IPv6 infrastructure and future-proof your DNS setup.
CNAME

CNAME (Canonical Name) Record

Domain Alias

Creates an alias that points to another domain name. The DNS lookup continues with the target domain.

Syntax:
www.example.com. 3600 IN CNAME example.com.
Use Case: Point multiple domain names to the same destination. Cannot be used at the root domain.
MX

MX (Mail Exchange) Record

Mail Server Configuration

Specifies the mail server responsible for accepting email messages on behalf of a domain. Ensure email deliverability with SPF, DMARC, and blacklist checks.

Syntax:
example.com. 3600 IN MX 10 mail.example.com.
Priority: Lower number = higher priority. Use multiple MX records for redundancy.
NS

NS (Name Server) Record

Nameserver Delegation

Delegates a DNS zone to use the specified authoritative name servers.

Syntax:
example.com. 3600 IN NS ns1.example.com.
Use Case: Define which servers are authoritative for your domain.
TXT

TXT (Text) Record

Arbitrary Text Data

Holds arbitrary text data. Commonly used for SPF, DKIM, domain verification, and security policies. Verify email authentication with our DMARC tool.

Syntax:
example.com. 3600 IN TXT "v=spf1 include:_spf.example.com ~all"
Use Case: Email authentication (SPF, DKIM), domain ownership verification, security policies.
PTR

PTR (Pointer) Record

Reverse DNS Lookup

Maps an IP address to a domain name (reverse of A record). Used for reverse DNS lookups. Test reverse DNS with our DNS Lookup tool.

Syntax:
1.2.0.192.in-addr.arpa. 3600 IN PTR example.com.
Use Case: Email server reputation, security verification, logging systems.
SOA

SOA (Start of Authority) Record

Zone Authority Information

Defines authoritative information about a DNS zone including primary name server, admin email, zone serial number, and timers.

Syntax:
example.com. 3600 IN SOA ns1.example.com. admin.example.com. 2025011001 3600 1800 604800 86400
Components: Primary NS, Admin Email, Serial, Refresh, Retry, Expire, Minimum TTL

Advanced DNS Records

SRV

SRV (Service) Record

Service Location

Defines the location of services such as XMPP, SIP, or LDAP servers.

Syntax:
_http._tcp.example.com. 86400 IN SRV 10 60 80 server.example.com.
Format: Priority Weight Port Target
CAA

CAA (Certification Authority Authorization)

SSL/TLS Certificate Control

Specifies which Certificate Authorities (CAs) are allowed to issue certificates for your domain. Verify SSL certificates with our SSL Checker tool. Learn more about security hardening.

Syntax:
example.com. 3600 IN CAA 0 issue "letsencrypt.org"
Use Case: Enhance SSL/TLS security by preventing unauthorized certificate issuance.
SPF

SPF (Sender Policy Framework)

Email Sender Verification (TXT Record)

Defines which mail servers are authorized to send email on behalf of your domain.

Syntax:
example.com. 3600 IN TXT "v=spf1 mx include:_spf.google.com ~all"
Use Case: Prevent email spoofing and improve email deliverability.
DKIM

DKIM (DomainKeys Identified Mail)

Email Authentication (TXT Record)

Provides cryptographic authentication for email messages using public key cryptography.

Syntax:
default._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCS..."
Use Case: Verify email authenticity and prevent email tampering.

Common TTL Values

TTL (seconds) Duration Use Case
60 1 minute Testing DNS changes, very short-lived records
300 5 minutes Active DNS changes, migrations in progress
3600 1 hour Standard for most records
86400 24 hours Stable records that rarely change
604800 7 days NS records, very stable configurations

DNS Query Tools

Query A Record

$ dig example.com

Query specific record type

$ dig example.com AAAA
$ dig example.com MX
$ dig example.com TXT

Query all records

$ dig example.com ANY

Short answer format

$ dig +short example.com

Use specific nameserver

$ dig @8.8.8.8 example.com

Reverse DNS lookup

$ dig -x 192.0.2.1

Alternative: nslookup

$ nslookup example.com

Alternative: host

$ host example.com

DNS Best Practices

Always use trailing dots for FQDN
Use example.com. not example.com
Lower TTL before making changes
Set TTL to 300 (5 minutes) 24-48 hours before DNS migration or major changes
Use multiple MX records for redundancy
Configure at least 2 MX records with different priorities for email reliability
Implement SPF and DKIM for email
Essential for email deliverability and preventing spoofing
Add CAA records for SSL/TLS security
Prevent unauthorized certificate issuance by specifying approved CAs
Document all DNS changes
Keep track of who, what, when, and why for each DNS modification
Monitor DNS propagation
Use tools like whatsmydns.net to verify DNS changes globally

Optimize Your DNS Infrastructure

Need reliable hosting with fast DNS propagation? Compare VPS providers to find DNS-optimized hosting with global network coverage. Learn more about how DNS works or explore DNS server types.