Skip to main content

DNS Record

In Turkish
DNS Kaydı
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/dns-record

In short

A DNS record is an entry in a domain's DNS zone that maps a name to information, such as an IP address (A, AAAA), another name (CNAME) or mail servers (MX).

What is a DNS record?

When a browser looks up www.example.com, DNS servers answer from the domain's records. Each record has a name, a type, a value and a TTL that says how long resolvers may cache it. Together, a domain's records form its zone, managed through the DNS provider or registrar.

The common types each do one job. A maps a name to an IPv4 address and AAAA to an IPv6 address. CNAME makes a name an alias for another name, as hosting platforms often ask for www. MX lists the servers that receive email. TXT holds text used for ownership checks and email security (SPF, DKIM, DMARC). NS names the authoritative servers for the zone, and CAA limits which certificate authorities may issue certificates for it.

Changes are not instant everywhere. Resolvers keep the old answer until its TTL expires, which is why a change can take minutes or hours to be seen worldwide. Lowering the TTL a day before a planned migration makes the switch faster, and tools such as dig show exactly what a resolver returns.

A common misconception is that a CNAME can be used at the root of a domain alongside other records. The standard forbids a CNAME on a name that has other records, and the bare domain always has NS and SOA records, so providers offer workarounds called ALIAS, ANAME or CNAME flattening for pointing example.com itself at a hostname.

Key takeaways

  • A DNS record maps a name to data, with a type, value and TTL.
  • A and AAAA point to IPv4 and IPv6 addresses; CNAME points to another name.
  • MX handles email; TXT holds verification and email security data.
  • Changes spread as cached answers expire, according to the TTL.
  • A bare domain can't use a plain CNAME; providers offer ALIAS records.

Example

Querying different record types with digbash
dig +short example.com A        # IPv4 address
dig +short example.com AAAA     # IPv6 address
dig +short www.example.com CNAME
dig +short example.com MX       # mail servers, with priorities
dig +short example.com TXT      # SPF, verification codes…

# Full answer, including the remaining TTL in seconds
dig example.com A +noall +answer
# example.com.  3600  IN  A  93.184.215.14

Readers ask

What is the difference between an A record and a CNAME?

An A record points a name directly to an IPv4 address. A CNAME points a name to another name, which is then resolved to an address. CNAMEs are useful when the target's address may change, such as a hosting provider's hostname.

How long do DNS changes take?

Up to the record's previous TTL, since resolvers may keep the old answer until it expires. With a TTL of 300 seconds, most users see a change within five minutes; with a day-long TTL it can take a day.

What is a TXT record used for?

Storing text that other systems read, most often to prove you own a domain for services like Google Search Console, and for email authentication records such as SPF, DKIM and DMARC.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings