Although there are a little over 25 DNS record types in total, only a few are normally used in any standard DNS zone configuration, such as for email and hosting services.
These are some of the most commonly used records:
-
A (Address) – This is the most commonly used record. It defines which IP address a specific domain name should resolve to.
- dominio.com A xxx.xxx.xxx.xxx
- PTR (Pointer) – Also known as a reverse record or rDNS, it works in the opposite direction to an A record, translating IP addresses into domain names, and is used by various applications to verify client identity.
-
MX (Mail eXchanger) – Used to identify mail servers. One or more mail servers can be defined for a domain, and the priority of each record can be specified.
- dominio.com MX(10) mail.dominio.com
-
CNAME (Canonical Name) – This is an alias assigned to a host that has a valid IP address and responds to multiple names. Several can be declared for the same domain. It is important to know that a CNAME record can only point to an existing A record and should never point to another CNAME, as this could create infinite loops.
- www.dominio.com CNAME dominio.com
-
NS (Name Server) – Defines the primary name servers for a domain. There must be at least one, but several can be declared for a domain.
- dominio.com NS ns1.dominio.com
- dominio.com NS ns2.dominio.com
- SOA (Start Of Authority) – This is the first record in the zone. Only one can be configured, and it is only present if the server is authoritative for the domain. It specifies the domain's primary DNS server, the administrator's email account, and the refresh interval for secondary servers. This pointer is usually defined by the hosting provider that hosts the domain's DNS zone.
- TXT (Text) – Allows additional information to be associated with a domain. This is used for other purposes, such as storing encryption keys. Currently, its most widespread use is to configure SPF for a domain.
Warning
There are some restrictions on the use of CNAME records that could cause the domain's entire DNS zone to stop working. For example, if you configure a CNAME record with the same name as another record in the zone, or a CNAME record at the root of the zone.
Examples:
sub.dominio.com CNAME dominio.com
sub.dominio.com MX(10) mail.dominio.com
dominio.com CNAME sub.dominio.com