The Best Guide of DNS For Better Understanding

  • Post author:
  • Post category:DNS

What is DNS ?

DNS, or Domain Name System, is a fundamental component of the internet that translates human-readable domain names into IP addresses. When you type a domain name (like domain.example.com) into your web browser, the DNS system is responsible for resolving that domain name to the corresponding IP address that identifies the server hosting the website.

What is domain name registration?

Domain name registration is the process of acquiring and registering a unique web address (domain name) on the internet. A domain name serves as the human-readable address that people use to access a website, and it plays a crucial role in identifying and locating websites on the World Wide Web.
If you want to get Your Domain Name Registration check her

How does DNS work?

The process of Domain name registration resolution involves converting a hostname (such as www.example.com) into a computer-friendly IP address (such as 192.168.1.1). An IP address is given to each device on the Internet, and that address is necessary to find the appropriate Internet device – like a street address is used to find a particular home. When a user wants to load a webpage, a translation must occur between what a user types into their web browser (example.com) and the machine-friendly address necessary to locate the example.com webpage.

In order to understand the process behind the DNS resolution, it’s important to learn about the different hardware components a DNS query must pass between. For the web browser, the DNS lookup occurs “behind the scenes” and requires no interaction from the user’s computer apart from the initial request.

Domain Name Request

When you enter a domain name in your browser, your computer sends a DNS query to a DNS resolver (usually provided by your Internet Service Provider or configured elsewhere).

DNS Resolver:
  • The DNS resolver is responsible for finding the IP address associated with the requested domain name. It first checks its local cache to see if it already knows the IP address.
Recursive Query:
  • If the resolver doesn’t have the information, it initiates a recursive query. It may contact other DNS servers to find the IP address.
Root DNS Servers
  • The resolver may start by querying the root DNS servers, which provide information about Top-Level Domains (TLDs) like .com, .org, etc.
TLD DNS Servers
  • The resolver then contacts the TLD DNS servers based on the information obtained from the root servers. For example, if the domain is domain.examples.com the resolver queries the .com TLD DNS server.
Authoritative DNS Servers
  • The TLD DNS server directs the resolver to the authoritative DNS servers for the specific domain (example.com). These authoritative servers contain the actual IP address information for the domain.
IP Address Response
  • The authoritative DNS server sends the IP address back to the resolver.
Local Cache
  • The resolver stores the IP address in its local cache for a certain period (time-to-live or TTL). Subsequent requests for the same domain can be answered directly from the cache, reducing the need for repeated DNS queries.
Connection to the Website
  • Finally, with the IP address obtained from DNS, your computer can connect to the web server hosting the requested website.

DNS is crucial for the functionality of the internet, enabling users to access websites using human-readable domain names instead of remembering numerical IP addresses. It plays a vital role in making the internet more user-friendly and scalable.

You can purchase the VPS hosting server : https://mirchihost.com/

DNS RECORDS

DNS (Domain Name System) records are crucial components that store information associated with domain names. They map human-readable domain names to numerical IP addresses or contain other information related to domain configuration. Each DNS record type serves a specific purpose. Here are some common DNS record types:

  1. A (Address) Record:
    • Associates a domain name with an IPv4 address. For example: css code example.com. IN A 192.168.1.1
  2. AAAA (IPv6 Address) Record:
    • Associates a domain name with an IPv6 address. Similar to the A record but for IPv6 addresses.yamlCopy codeexample.com. IN AAAA 2001:0db8:85a3:0000:0000:8a2e:0370:7334
  3. CNAME (Canonical Name) Record:
    • Creates an alias for one domain to another domain. It is often used for subdomains or when a domain needs to point to another domain.objectivecCopy codewww.example.com. IN CNAME example.com.
  4. MX (Mail Exchange) Record:
    • Specifies mail servers responsible for receiving emails on behalf of the domain.Copy codeexample.com. IN MX 10 mail.example.com.
  5. TXT (Text) Record:
    • Allows domain owners to attach arbitrary text to a domain. It is often used for domain verification, SPF records (for email authentication), and other purposes.arduinoCopy codeexample.com. IN TXT "v=spf1 include:_spf.example.com ~all"
  6. NS (Name Server) Record:
    • Specifies authoritative DNS servers for the domain.Copy codeexample.com. IN NS ns1.example.com.
  7. PTR (Pointer) Record:
    • Used for reverse DNS lookups, mapping an IP address to a domain name.Copy code1.1.168.192.in-addr.arpa. IN PTR example.com.
  8. SOA (Start of Authority) Record:
    • Provides authoritative information about the domain, including the primary DNS server, the email of the domain administrator, domain serial number, and timers for refreshing the record.scssCopy codeexample.com. IN SOA ns1.example.com. admin.example.com. (2023010101; serial 7200; refresh (2 hours) 3600; retry (1 hour) 1209600; expire (2 weeks) 86400; minimum (1 day))
  9. SRV (Service) Record:
    • Specifies information about available services within the domain, such as LDAP or SIP services.yamlCopy code_sip._tcp.example.com. IN SRV 10 60 5060 sipserver.example.com.

These are just a few examples of DNS record types. The combination and configuration of these records define how a domain functions and directs traffic on the internet. DNS records are managed through domain registrars or DNS hosting providers, allowing domain owners to control their online presence and services.

What’s the difference between an authoritative DNS server and a recursive DNS resolver?

Both concepts refer to servers (groups of servers) that are integral to the DNS infrastructure, but each performs a different role and lives in different locations inside the pipeline of a DNS query. One way to think about the difference is the recursive resolver is at the beginning of the DNS query and the authoritative nameserver is at the end.

Recursive DNS resolver

The recursive resolver is the computer that responds to a recursive request from a client and takes the time to track down the DNS record does this by making a series of requests until it reaches the authoritative DNS nameserver for the requested record (or times out or returns an error if no record is found). Luckily, recursive DNS resolvers do not always need to make multiple requests in order to track down the records needed to respond to a client; caching is a data persistence process that helps short-circuit the necessary requests by serving the requested resource record earlier in the DNS lookup.

DNS Record Request Sequence - DNS Recursive Resolver gets request from client

Authoritative DNS server

Put simply, an authoritative DNS server is a server that actually holds, and is responsible for, DNS resource records. This is the server at the bottom of the DNS lookup chain that will respond with the queried resource record, ultimately allowing the web browser making the request to reach the IP address needed to access a website or other web resources. An authoritative nameserver can satisfy queries from its own data without needing to query another source, as it is the final source of truth for certain DNS records.

DNS Record Request Sequence - DNS query reaches authoritative nameserver for cloudflare.com