Skip to main content

Command Palette

Search for a command to run...

DNS Record Types Explained

Published
3 min readView as Markdown

The Domain Name System (DNS) is a hierarchical and distributed naming system that translates human-readable domain names into IP addresses, enabling users to access websites easily.

  • Converts domain names into IP addresses.

  • Eliminates the need to remember numerical IP addresses.

  • Works using a hierarchical structure of servers.

  • Uses root, TLD, and authoritative DNS servers for resolution.

  • Supports caching to improve speed and reduce network traffic.

Why DNS records are needed:-

  • The DNS records are very important as they provide very vital information about the domain name which helps DNS to resolve query and provide the browser correct IP address so that the browser can send request to the server.

  • There are various DNS record which give information about different things.

  • A record:- Address record it maps the fully qualified domain name to the IPV4 address .

  • AAA record:- It does the same thing as A record just it maps to the IPV6 address.

  • MX record:- Mail Exchange record it gives the address of the domain name’s server to which the email has to be delivered.

  • TXT:- It is a DNS record which contains Textual Information regarding the Website and Mostly is used for verification purpose.

  • CNAME:-This record is used to map a domain name to another domain name. Mostly used when you want many different domain name point to the same website. It is also known as alias or cannonical name.

  • NS record:-This record contains the name of the Authorative DNS server of the domain name and that DNS server further provides the IP address of the website where the request had to be sent by the

    browser.

A vs CNAME (Common Confusion)

  • An A record points directly to an IP address.

  • A CNAME record points to another domain name.

A domain name cannot have both an A record and a CNAME record at the same time.

NS vs MX (Another Common Confusion)

  • NS record decides who manages the domain’s DNS.

  • MX record decides where emails should be delivered.

They serve completely different purposes.

How One Domain Uses Multiple DNS Records Together

A single domain uses different DNS records for different tasks:

  • A / AAAA records for website access

  • CNAME records for aliases

  • MX records for email delivery

  • NS records for DNS control

  • TXT records for verification and security

All these records work together to make sure the domain functions correctly. So basically all these records are responsible for providing the appropriate information.

DNS FLOW:-

Conclusion:-

DNS records play an essential role in how the internet works.
By understanding what each record does and the problem it solves, developers can manage websites, emails, and production systems more confidently.