What is DNS?

Posted in

What is DNS?
Aashiyamittal

Aashiya Mittal
Last updated on December 22, 2024

    DNS, or domain name system, is the unit that handles the naming of websites on the internet. Any device connected to the internet - laptops, tablets, mobile phones - contains an IP address like 93.184.216.34 for identification, but this is obviously, not easy to remember.

    What is DNS?

    A domain name such as www.techgeekbuzz.com is something that people can easily recognize and remember. DNS maps domain names with IP addresses enabling humans to use memorable domain names while computers on the internet continue using IP addresses.

    Furthermore, browsing a company’s web page from 128.114.22.25 means that if the company moves the web server to a different machine with a different IP address, everyone needs to know about the new IP address.

    To solve the above problem, high-level readable names were introduced to decouple machine names from a machine. This high-level readable name is known as the domain name, and the system that maintains these domain names is called the domain name system. In other words, a domain name is a string of words that maps to a numeric IP address.

    More precisely, a domain name is a text that a user types into a web browser to access a particular website. For instance, the domain name for Google is ‘www.google.com,’ and for YouTube, it is ‘www.youtube.com.’ Nevertheless, since the network itself understands only numerical addresses, some mechanism is required to convert the names to network addresses. This is where the domain name system comes into the picture. In the following sections, we will study how this mapping is accomplished on the Internet.

    The History of Domain Name System

    In the ARPANET days, there used to be a single file, ‘hosts.txt’, to list all the computer names and their IP addresses. Every night, all the hosts would fetch it from the site at which it was maintained. For a network of a few hundred machines, this approach worked well. However, with an increase in the number of PCs being connected to the Internet, everyone realized that this approach could not continue to work forever.

    The most pertinent point is that the size of the file would become too large. Another point to consider is that hostname conflicts would constantly occur unless names were centrally managed. To solve these problems, DNS (Domain Name System) was invented in 1983. It is a hierarchical, domain-based naming scheme and a distributed database system for implementing this naming scheme.

    DNS Namespace

    For the Internet, the top of the naming hierarchy is managed by an organization called ICANN (Internet Corporation for Assigned Names and Numbers) . ICANN was created for this purpose in 1998 as part of the maturing of the Internet into a worldwide economic concern.

    The Internet is divided into Top-level domains (TLDs), where each domain can cover many hosts. Each domain can further be partitioned into many sub-domains (second-level domain (2LD) and so on), which can further be partitioned and so on. The top-level domains come in 2 categories: generic and countries. The country domains include one entry for every country.

    Domain names are typically broken up into 2 or 3 parts, each separated by a dot. When reading from right to left, the identifiers in domain names go from most general to most specific. The section to the right of the last dot in a domain name is the top-level domain (TLD). These include the ‘generic’ TLDs such as ‘.com’, ‘.net’, and ‘.org’, as well as country-specific TLDs like ‘.uk’ and ‘.in.’ All of the above domains can be represented by a tree-like structure, where the leaves of the tree define the domains that do not have further sub-domains.

    How does the Domain Name System Work?

    Let us now understand how the mapping between IP address and the domain name works:

    • A user first enters a URL like www.techgeekbuzz.com in the address bar and presses the enter button.
    • The user request is routed to a DNS resolver, which is managed by the user’s ISP that can be given by DSL broadband providers (like Airtel, BSNL, and MTNL) and local cable Internet providers.
    • The DNS Resolver further redirects the request to the DNS Nameserver, where the query is redirected to the root name server.
    • After getting a response from the root name server about the top-level domain (in this example, ‘com’). The query is further redirected to the top-level domain nameserver to know the details about the sub-domain (‘techgeekbuzz’ as per the example).
    • The above step is repeated until you get the expected IP address of the domain you are looking for after getting details of all the subdomains present in the domain name.
    • At last, the youtube name server will return the address to the local nameserver. The DNS resolver for the ISP finally has the IP address that the user needs. The resolver returns that value to the web browser. The DNS resolver also caches (stores) the IP address for techgeekbuzz.com for some amount of time so that it can quickly respond the next time someone browses techgeekbuzz.com.

    This process of looking up a name and finding an address is called name resolution. You can explore this process using standard tools, such as the dig program that is installed on most UNIX systems.

    Registering Domain Names

    Getting a second-level domain, such as name-of-company.com, is easy. The top-level domains are run by registrars appointed by ICANN. Getting a name merely requires going to a corresponding registrar (for .com in this case) to check if the desired name is available. If there are no problems, the requester pays the registrar a small annual fee and gets the name.

    Once a domain name has been registered with a registrar, that registrar is in charge of notifying the registrant when their domain is about to expire and giving them a chance to renew, ensuring they don’t lose their domain name.

    Domain names are very cheap to register, although they must be renewed every regular time interval (For example, every year) depending upon the plan which the user selects for their website. When the renewal period expires, the domain name becomes available for others to purchase. Domain names are case-insensitive, so GOV, gov, and Gov mean the same thing.

    Conclusion

    In this article, we learned about DNS and its necessity to keep the world of the internet ticking. We have been using lots of websites till now, and now we are able to understand how things are getting converted from human-readable formats to machine-readable formats and how we see web pages as a result. Aren't such things interesting to learn? For such similar technology-related knowledge, stay tuned and keep learning.

    People are also reading:

    FAQs


    There are three types of DNS queries, namely recursive query, iterative query, and non-recursive query.

    DNS or Domain Name System is the phonebook of the internet. It translates the domain names that are readable by common people into IP addresses that machines understand.

    A DNS server is a computer system that stores a database of public IP addresses and their corresponding hostnames.

    There are three different types of DNS servers, namely primary servers, caching servers, and secondary servers.

    On your Windows computer, go to the Command Prompt (CMD), type “ipconfig/all”, and hit enter. You will find your DNS.

    Leave a Comment on this Post

    0 Comments