Original: https://dyn.com/blog/dns-why-its-important-how-it-works/

The Domain Name System (DNS) is used to process human-readable host names like www.dyn.com into machine-readable IP addresses like 204.13.248.115. DNS also provide some other information about the domain name, such as mail services (” can refer to the https://baike.baidu.com/item/ email server # 3 _4).

But why is DNS so important? How does it work? What else should you know?

Why is DNS so important?

DNS is like the phone book of the Internet. If you know someone’s name but don’t know their phone number, you can easily look it up in the phone book. DNS provides the same service over the Internet.

When you visit http://www.dyn.com with your browser, your computer uses DNS to retrieve the IP address of the site as 204.13.248.115. If you don’t have DNS, you can only access websites directly using IP addresses.

How does DNS work?

When you access a domain name such as http://www.dyn.com, your computer converts a human-readable Web address into a machine-readable IP address, step by step, in this order. This is true every time you use a domain name, whether you’re browsing websites, sending emails or listening to online radio like Pandora.

Step 1: Request information

The whole process starts when you ask the computer to process a host name, say by visiting http://www.dyn.com. The computer’s first focus is on its local DNS cache, which stores information that the computer has recently received.

If the computer does not get an answer, it is time to perform a DNS query.

Step 2: Ask the recursive DNS server

If the required information is not stored locally, the computer will contact your ISP’s recursive DNS server. These specialized machines do the legwork of DNS queries for you. The recursive server also has its own cache, so it is often possible to complete the query process at this step and return the information to the user.

Step 3: Ask the root server

If the recursive servers don’t have an answer, they query the root nameservers. A Nameserver is a machine that answers questions about domain names, such as IP addresses. The 13 root servers around the world act as the telephone switchboard for DNS. They don’t know the answer, but they can tell us who to ask so we can find out.

Step 4: Ask the TLD server

The root server finds.com in www.dyn.com based on the first part of the request, reading from right to left, and directs the request to the TLD Nameservers (top-level domain nameserver) corresponding to.com. Each TLD, such as.com,.org, and.us, has its own set of DNS servers that act as its operators. These servers also don’t have the information we need, but they can direct us to the servers that do.

Step 5: Ask the authoritative DNS server

The TLD server proceeds to the next part of the request, www.dyn.com, The authoritative Nameservers are the machines that store all the information for a particular domain name in DNS records. There are many kinds of records, each containing a different kind of information.

In this case, we want to know the IP Address of www.dyn.com, so we ask the authoritative server for the Address Record (A, that is, the Address Record).

Step 6: Receive a record

The recursive server receives dyn.com’s A record from the authoritative server and stores it in its own local cache. When someone else requests dyn.com’s host records, the recursive server is ready to go, without having to go through the search process.

All records have a time-to-live value, similar to expiration time. After a period of time, the recursive server needs a new copy of the record to ensure that the information does not expire.

Get your answer

Your computer gets the record with the answer returned by the recursive server and stores it in its own cache. Then read the IP address from the record and report that information to your browser. The browser then establishes a connection to the server and receives the site data.

From start to finish, this whole process can be completed in milliseconds.

Long press the QR code or search fewelife to follow us