What is DNS?

DNS, which stands for Domain Name System, is a fundamental system used on the internet to translate human-readable domain names (like “www.example.com”) into IP addresses (such as “192.0.2.1”) that computers and network devices use to identify each other on the network. DNS serves several critical functions:

  • Domain Name Resolution.
  • Load Balancing and Redundancy.
  • Caching.
  • Reverse DNS Lookup.
  • Domain Ownership Verification.

Read More to know what is functioning DNS do?

Listed below are several DNS record types

There are may different DNS record types has that are using for different type of perpose using. Without DNS record entry on dns software DNS server will not work.

SOA (Start of Authority):


The SOA record is a fundamental DNS record for a domain. It contains administrative information about the domain, such as the primary authoritative nameserver for the domain, the email address of the domain administrator, a serial number to track changes, and other settings related to zone transfers and TTLs. Every DNS zone must have SOA record. Here’s an example:

   example.com. IN SOA ns1.example.com. admin.example.com. (
                   2023082101 ; serial number
                   3600       ; refresh (1 hour)
                   900        ; retry (15 minutes)
                   1209600    ; expire (2 weeks)
                   86400      ; minimum (1 day)
                   )

NS (Name Server):

NS records specify the authoritative nameservers for a domain. These records indicate which DNS servers are responsible for answering queries about the domain. NS records help direct DNS queries to the correct DNS servers. Here’s an example:

   example.com. IN NS ns1.example.com.
   example.com. IN NS ns2.example.com.

A (Address):

A records map a domain name to an IPv4 address. They are used to resolve a domain name to an IP address. Here’s an example:

   www.example.com. IN A 192.168.1.100

CNAME (Canonical Name):

CNAME records create an alias for a domain name. They are often used to redirect one domain to another or to handle subdomains. Here’s an example:

   www.example.com. IN CNAME example.com.

MX (Mail Exchange):

MX records specify mail servers responsible for receiving emails for a domain. Priority values are assigned to indicate the order in which mail servers should be used. Here’s an example:

   example.com. IN MX 10 mail.example.com.

TXT (Text):

TXT records contain arbitrary text and are often used to provide additional information or verification data. They’re commonly used for SPF and DKIM. Here’s an example:

   example.com. IN TXT "v=spf1 a mx ~all"

AAAA (IPv6 Address):

AAAA records map a domain name to an IPv6 address, similar to A records for IPv4. Here’s an example:

   www.example.com. IN AAAA 2001:0db8:85a3:0000:0000:8a2e:0370:7334

SRV (Service):

SRV records define the location of specific services within a domain. They’re often used for protocols like SIP and XMPP. Here’s an example:

   _sip._tcp.example.com. IN SRV 10 5 5060 sipserver.example.com.

PTR (Pointer):

PTR records are used in reverse DNS lookup, mapping an IP address to a domain name. They’re mainly used for verifying the source of incoming emails. Here’s an example:

   100.1.168.192.in-addr.arpa. IN PTR mail.example.com.

The syntax and usage may vary depending on the DNS server software you’re using, but these examples should give you a solid understanding of how these DNS resource records type work and how they’re utilized in the DNS system.

What is the Name Server entry?

When configuring the NS (Name Server) records in your DNS zone file, you should specify the IP addresses of the authoritative nameservers for your domain. These nameservers are responsible for providing DNS information about your domain to the rest of the internet. Typically, you should use the public IP addresses of your authoritative nameservers. Here’s an example of how to set up NS records with IP addresses:

Suppose you have a domain called example.com, and you have two authoritative nameservers, ns1.example.com and ns2.example.com, with their respective IP addresses:

  • ns1.example.com has an IP address of 203.0.113.1.
  • ns2.example.com has an IP address of 203.0.113.2.

You would include NS records for these nameservers in your zone file like this:

$TTL 86400
@       IN      SOA     ns1.example.com. admin.example.com. (
                2023082101 ; serial
                3600       ; refresh (1 hour)
                900        ; retry (15 minutes)
                1209600    ; expire (2 weeks)
                86400      ; minimum (1 day)
                )
        IN      NS      ns1.example.com.
        IN      NS      ns2.example.com.

ns1     IN      A       203.0.113.1
ns2     IN      A       203.0.113.2

In this example:

  • The NS records specify that ns1.example.com and ns2.example.com are the authoritative nameservers for the example.com domain.
  • The A records provide the IP addresses of these nameservers.

Make sure that the IP addresses you specify in the A records correspond to the actual public IP addresses of your authoritative nameservers. Additionally, keep in mind that it may take some time for DNS changes to propagate across the internet, so be patient after making these updates to your DNS zone file.

Read More: TTL full form in Networking? TTL (Time To Live)