Skip to main content

What is a DNS record?

A DNS record is a single entry in a DNS zone that stores information about a domain and answers one specific question: what to do with this domain name.

In simpler terms: a DNS record is the rule by which DNS understands where and how to route requests.


Why DNS records are needed

DNS by itself is a system. And DNS records are the data stored within it.

DNS records are what tell DNS:

  • which IP a domain points to
  • where the mail server is located
  • which DNS servers serve the domain
  • other service information

Without DNS records, DNS would not know what to answer.


Where DNS records are stored

DNS records:

  • are stored in a DNS zone
  • are served by authoritative DNS servers
  • are configured by the domain administrator

The most important types of DNS records

A record

Links a domain to an IPv4 address.

Example:

example.com -> 93.184.216.34

AAAA record

Links a domain to an IPv6 address.


CNAME

Indicates that a domain is an alias for another domain.

Example:

www.example.com -> example.com

MX

Indicates which servers accept mail for a domain.


NS

Shows which DNS servers are responsible for the zone.


TXT

Stores arbitrary text (often used for verification, SPF, DKIM).


What a DNS record usually contains

Every DNS record includes:

  • a name (a domain or subdomain)
  • a record type (A, MX, CNAME, etc.)
  • a value (IP, domain, text)
  • TTL: how long the record lives in cache

An important point for an interview

  • a DNS record is not a domain
  • one domain can have many DNS records
  • DNS records can be changed without changing the domain name

Real-life example

DNS records are like lines in a phone book:

  • a name
  • a contact type (mobile, work)
  • a phone number

DNS is the book, DNS records are the entries in it.


Short interview answer

Remember this formulation:

A DNS record is an element of a DNS zone that holds information about a domain and defines how DNS should handle requests for that name, for example linking it to an IP address or a mail server.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.