What is a Domain Name Server (DNS) and how does it work?
DNS is the substance that binds the internet together.
DNS is a system that converts domain names to IP addresses for Internet-connected devices like computers and services. It changes www.google.com into Internet Protocol (IP) addresses for human readable domain names (220.127.116.11).
DNS stand for Domain Name System/Service. It’s used to resolve FQDN (Fully qualified domain name) to IP address and Vice versa such as www.example.com to 18.104.22.168. The Domain Name Server is essential to how systems connect to and communicate with one another worldwide. Without a domain name system, computers and people would only be able to communicate using IP addresses, which are numerical addresses.
– Domain Name systems
Since computers can only communicate using numerical sequences, DNS was created as a kind of “phonebook” that converts the domain you enter in your browser into an IP that can be understood by computers.
So simply we can say, Domain Name System (DNS) is the phonebook of the Internet. Domain names like espn.com or the newyork times.com are used by people to access information online. Through Internet Protocol (IP) addresses, web browsers may communicate. In order for browsers to load Internet resources, DNS converts domain names to IP addresses.
Each Internet-connected device has a distinct IP address that other computers can use to find the device. DNS servers take the place of the necessity for people to remember IP addresses like 192.168.1.1 (in IPv4) or more complicated modern alphanumeric IP addresses like 2400:cb00:2048:1::c629:d7a2 (in IPv6).
When you visit https://www.future4tech.com in a browser, your computer uses DNS to retrieve the website’s IP address of this website. Without DNS, you would only be able to visit our website (or any website) by visiting its IP address directly.
DNS servers use many sorts of records to efficiently manage resolution and give crucial domain information. DNS servers cache the information in these records. Each record has a TTL (Time To Live) value in seconds associated with it; these values specify the time for the cached record to expire on the DNS server, which can range from 60 to 86400 depending on the DNS provider.
- A (Host address)
- AAAA (IPv6 host address)
- CNAME (Canonical name for an alias)
- MX (Mail Exchange)
- NS (Name Server)
- PTR (Pointer)
- SOA (Start Of Authority)
- SRV (location of service)
- TXT (Descriptive Text)
How Does DNS Work
Before we can discuss how to use DNS, we must first grasp how the system works. We already know that it converts IP addresses to domain names, but where does this data reside? On the nameservers!
DNS records, which are the actual files that specify “this domain” corresponds to “this IP address,” are stored on nameservers. Is there anywhere where all of the nameservers and DNS records for every site on the Internet are kept? No way… would that be absurd.
They are truly found all over the planet. These are the root nameservers, and rather than keeping every domain ever, they store the locations of the top level domains (TLDs).
TLDs are the two- or three-letter additions, such as “.com,” to a domain name. Each TLD has a unique set of nameservers that keep track of who is in charge of maintaining the DNS records for a certain domain. The DNS provider or DNS registrant is often the authoritative nameserver (like GoDaddy that offers both DNS registration and hosting). The DNS record that links example.com to the IP address 127.66.122.88 can be found here.
Let’s say you wish to use your web browser to access the page “www.future4tech.com.” We take into account the “normal” setup for a home network. It’s possible that the structure differs somewhat in some networks.
Step 1 – Request an IP address from the DNS server.
This request travels to your router once you have sent the URL in your browser. It searches its DNS cache to see if it can locate an IP address for the entry for www.future4tech.com (register, in which the IP addresses with domain names stand).
If an entry already exists, the system determines if the TTL has run out. This entry’s continued validity is the simplest scenario. After then, your router simply returns the IP address.
Step 2 – The router searches the Internet for IP addresses.
If the entry is missing or the TTL has expired, your router must look for the right IP address. This is accomplished by querying many DNS servers on the Internet for the current IP address. Until one DNS server responds, saying, “Hey, I have the current IP address for www.future4tech.com.” With these fundamentals, we don’t care how the server operates in detail.
Step 3 – A response is sent with a valid address.
Your router receives the correct IP address back. It keeps it till a new need arises. The game would then restart at step 1 at that point.
Step 4 – Response from Router to Client
Following that, you obtained the IP address of the target server, and your computer would now request the page’s real data via HTTP. The “DNS procedure” has now finished.