Referencia de registros DNS
Guía de referencia rápida de tipos de registros DNS incluyendo A, AAAA, CNAME, MX, TXT, NS, SOA, SRV y PTR
Referencia de registros DNS
Guía de referencia rápida de tipos de registros DNS incluyendo A, AAAA, CNAME, MX, TXT, NS, SOA, SRV y PTR
Maps a domain name to an IPv4 address. This is the most fundamental DNS record type, used to point a domain to the server hosting it.
Format
name TTL IN A ipv4-addressExample
example.com. 3600 IN A 93.184.216.34
Fields
Common Use Cases
- Pointing a domain to a web server
- Load balancing with multiple A records (round-robin DNS)
- Setting up subdomains (e.g., blog.example.com)
Notes
Multiple A records can exist for the same domain, enabling basic round-robin load balancing. The TTL determines how often resolvers re-query for updates.
Maps a domain name to an IPv6 address. The quad-A record is the IPv6 equivalent of the A record, supporting the 128-bit address format.
Format
name TTL IN AAAA ipv6-addressExample
example.com. 3600 IN AAAA 2606:2800:220:1:248:1893:25c8:1946
Fields
Common Use Cases
- Enabling IPv6 connectivity for domains
- Dual-stack configurations alongside A records
- Future-proofing domain infrastructure
Notes
Often configured alongside A records for dual-stack support. As IPv4 addresses become scarcer, AAAA records are increasingly important.
Creates an alias from one domain name to another (the canonical name). The DNS resolver follows the chain until it finds an A or AAAA record.
Format
alias TTL IN CNAME canonical-nameExample
www.example.com. 3600 IN CNAME example.com.
Fields
Common Use Cases
- Pointing www to the root domain
- CDN integration (e.g., pointing to cdn.provider.com)
- SaaS service domain mapping
- Simplifying DNS management for subdomains
Notes
CNAME records cannot coexist with other record types for the same name. They cannot be used at the zone apex (root domain). Use ALIAS/ANAME records for that purpose if your DNS provider supports them.
Specifies the mail server(s) responsible for receiving email for a domain. The priority value determines the order in which mail servers are tried.
Format
name TTL IN MX priority mail-serverExample
example.com. 3600 IN MX 10 mail.example.com. example.com. 3600 IN MX 20 backup-mail.example.com.
Fields
Common Use Cases
- Setting up email delivery for a domain
- Configuring Gmail, Outlook 365, or other email services
- Setting up backup mail servers with higher priority numbers
- Anti-spam configuration
Notes
The mail server in an MX record must be a hostname (FQDN), not an IP address. Multiple MX records with different priorities enable failover. Lower priority values are preferred.
Holds free-form text data. Widely used for domain verification, email authentication (SPF, DKIM, DMARC), and other machine-readable information.
Format
name TTL IN TXT "text-data"Example
example.com. 3600 IN TXT "v=spf1 include:_spf.google.com ~all" example.com. 3600 IN TXT "google-site-verification=abc123def456"
Fields
Common Use Cases
- SPF records for email authentication
- DKIM public key publication
- DMARC policy configuration
- Domain ownership verification (Google, Microsoft, etc.)
- Security policies and human-readable notes
Notes
TXT records are limited to 255 characters per string, but multiple strings can be concatenated. SPF, DKIM, and DMARC all use TXT records with specific prefixes.
Specifies the authoritative DNS servers for a domain. These are the servers that hold the definitive DNS records for the zone.
Format
name TTL IN NS nameserverExample
example.com. 86400 IN NS ns1.example.com. example.com. 86400 IN NS ns2.example.com.
Fields
Common Use Cases
- Delegating a domain to specific DNS providers
- Setting up subdomain delegation
- Configuring redundant name servers
Notes
Every domain must have at least two NS records for redundancy. NS records at the zone apex define who is authoritative for that zone. Glue records (A records for the NS servers) are needed when NS records point to names within the same zone.
Contains administrative information about the zone, including the primary nameserver, contact email, and zone transfer timing parameters.
Format
name TTL IN SOA primary-ns admin-email serial refresh retry expire minimumExample
example.com. 86400 IN SOA ns1.example.com. admin.example.com. 2024010101 3600 900 604800 86400
Fields
Common Use Cases
- Required for every DNS zone (exactly one per zone)
- Zone transfer configuration between primary and secondary servers
- Setting negative caching TTL (NXDOMAIN responses)
Notes
Every DNS zone must have exactly one SOA record. The serial number must be incremented whenever zone data changes. The admin email uses a dot instead of @ (admin.example.com means admin@example.com).
Maps an IP address back to a domain name (reverse DNS). Used for reverse lookups, which are the opposite of A/AAAA records.
Format
reverse-ip.in-addr.arpa. TTL IN PTR hostnameExample
34.216.184.93.in-addr.arpa. 3600 IN PTR example.com.
Fields
Common Use Cases
- Reverse DNS lookups (IP to hostname)
- Email server verification (many mail servers check PTR records)
- Network diagnostics and logging
- Anti-spam measures
Notes
PTR records are managed by the IP address owner (usually the ISP or hosting provider). For email delivery, it is strongly recommended that PTR records match the server hostname. The IP address is written in reverse order in the record name.
Specifies the location of a service (hostname and port) for a given protocol. Allows service discovery without hardcoding server addresses.
Format
_service._protocol.name TTL IN SRV priority weight port targetExample
_sip._tcp.example.com. 3600 IN SRV 10 60 5060 sip1.example.com. _sip._tcp.example.com. 3600 IN SRV 10 40 5060 sip2.example.com.
Fields
Common Use Cases
- VoIP/SIP service discovery
- XMPP/Jabber server configuration
- Microsoft Active Directory and Kerberos
- CalDAV and CardDAV server discovery
- Minecraft server discovery
Notes
SRV records enable service discovery and load balancing. The weight field allows proportional load distribution among servers with the same priority. A target of "." means the service is not available.
