The Domain Name System (DNS) is used to resolve human-readable hostnames like www.sample.com into machine-readable IP addresses like 126.96.36.199. DNS also provides other information about domain names, such as mail services.
Why is DNS important?
When you visit http://sample.com in a browser, computer uses DNS to retrieve the website’s IP address of 188.8.131.52. Without DNS, you would only be able to visit website by visiting its IP address directly, such as http://184.108.40.206.
When you visit a domain such as sample.com, computer follows a series of steps to turn the human-readable web address into a machine-readable IP address. This happens every time when you use a domain name, whether you are viewing websites, sending email or listening to Internet radio stations.
Step 1: Request information
The process begins when you ask computer a hostname, such as visiting http://sample.com. The first computer looks in its local DNS cache, which stores information that has recently retrieved.
If it doesn’t had the answer, it perform a DNS query to find out.
Step 2: Ask the recursive DNS servers
If the information is not stored locally, computer contacts ISP’s recursive DNS servers. Recursive servers have their own caches, so the process usually ends here and the information is returned to the user.
Step 3: Ask the root nameservers
If the recursive servers don’t have the answer, they query the root nameservers. A nameserver is a computer that answers questions about domain names, such as IP addresses. The thirteen root nameservers act as a kind of telephone switchboard for DNS. They don’t know the answer, but they can direct query to someone that knows where to find it.
Step 4: Ask the TLD nameservers
The root nameservers will look request, reading from right to left —www.sample.com— and direct query to the Top-Level Domain(TLD) nameservers for .com. Each TLD, such as .com, .org, and .us, have their own set of nameservers. These servers don’t have the information we need, but they can refer directly to the servers that have the information.
TLDs Supported for Domain Transfers
.com most popular
.net general purpose
.cc Cocos Islands
.online Everyone wants to be online
.tech Tech startups and organizations
.cx Christmas Island
.gs British overseas territory (SGSSI)
.store For ecommerce
.website For a fresh identity on the web
.xyz For distinctive extension
.us United States
.protection Inspire confidence
.security For security services
Step 5: Ask the authoritative DNS servers
The TLD nameservers direct our query to the nameservers responsible for this specific domain. These authoritative nameservers are responsible for knowing all the information about a specific domain, which are stored in DNS records. There are many types of records, each contain a different kind of information. Here, we want to know the IP address for www.sample.com, so we ask the authoritative nameserver for the Address Record (A).
Common Record Types
A or AAAA Record – A Records are the most basic type of DNS record and are used to point a domain or subdomain to an IP address.
CNAME record– CNAME records are another commonly used type of DNS entry that are used to point a domain or subdomain to another hostname.
MX Record – Mail Exchanger (MX) records are used to route email according the domain owners preference. The MX record itself specifies which server(s) use to deliver mail when this type of request is made to the domain. They differ from A Records and CNAMEs in the way that they require a “priority” value as a part of their entry. The priority number is used to indicate which of the servers listed as MX records to use first.
TXT Records – A TXT record is used to store any text-based information that can be grabbed when necessary. We most commonly see TXT records used to hold SPF data and verify domain ownership.
Step 6: Retrieve the record
The recursive server retrieves the A record for sample.com from the authoritative nameservers and stores the record in its local cache. If anyone else requests the host record for sample.com, the recursive servers will already have the answer and will not go through the lookup process again. All records have a time-to-live value, which is like an expiration date. After a while, the recursive server will ask for a new copy of the record to make sure the information doesn’t become out-of-date.
Step 7: Receive the answer
With the answer, recursive server returns the A record back to computer. Computer stores the record in its cache, reads the IP address from the record, then passes this information to browser. The browser then opens a connection to the webserver and receives the website.
This entire process, from start to finish, takes only milliseconds to complete.
Reffercence Links :