DNS record
A DNS record is a piece of information stored in the Domain Name System (DNS), which helps computers find services by name. When a device asks for information about a domain or a name beneath it, DNS servers can return records that say, for example, which IP address a web name uses or which mail servers receive email for a domain.
What does a DNS record look like?
A record has a name, a type, and data whose meaning depends on that type. Many records also have a TTL, or time to live: the number of seconds a resolver may keep a temporarily saved copy of the answer before checking again. A resolver is software that looks up DNS information on behalf of a device or application.
For example, a simplified A record might be written as:
www.example.com. 3600 IN A 192.0.2.25
Here, www.example.com. is the name being described, 3600 is the TTL in seconds, IN means the Internet class, A identifies the record type, and 192.0.2.25 is the IPv4 address in its data. An A record is one specific kind of DNS record. The IP address shown is reserved for documentation, so it is an example rather than a live website destination.
What are records used for?
Different record types answer different questions. An A record gives an IPv4 address; an AAAA record gives an IPv6 address. An MX record names mail servers for a domain, while a TXT record holds text used by services for purposes such as domain verification or email policy. An NS record identifies the nameservers that publish answers for a DNS zone, a part of DNS managed together. These types have different data formats and purposes; changing one does not automatically change the others.
Suppose a small business moves its website to a new server but keeps its email at the same provider. It may need to update the A or AAAA record used for the website while leaving the MX records unchanged. Visitors can then reach the new web server, while incoming email continues to use the existing mail servers, provided the rest of each service is configured correctly.
Where are DNS records managed?
Records are managed in a DNS zone, the set of DNS information served for a part of the name hierarchy. The company controlling that zone may provide a dashboard for adding or changing records. This may be the domain registrar, the hosting company, or a separate DNS provider. The nameservers named for the domain answer DNS questions using the zone data they serve.
DNS records guide name lookups. They do not contain the website itself, create an email mailbox, or prove that the destination service is working. A correct address record can point to a server that is offline, and email delivery also depends on the mail service and its configuration.
Related terms
- DNS — the distributed system that stores and looks up records
- A record — maps a name to an IPv4 address
- MX record — identifies mail servers for a domain
- Nameserver — a server that answers DNS queries for a zone