{"id":19154,"date":"2016-05-09T07:51:54","date_gmt":"2016-05-09T12:51:54","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=19154"},"modified":"2022-06-03T03:43:36","modified_gmt":"2022-06-03T08:43:36","slug":"what-is-dns-and-how-does-it-work","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/what-is-dns-and-how-does-it-work\/","title":{"rendered":"What is DNS?"},"content":{"rendered":"
<\/p>\n
We will explain to you\u00a0What is DNS? and how does it work?\u00a0You’ve probably noticed how DNS is mentioned all over the Internet. Every website uses it and every website owner should know more about DNS because without it your website will not be visible to the Internet users. Understanding how DNS works is crucial so that is why in this article we will cover the DNS basics and we’ll explain what exactly happens when you type a domain, for example rosehosting.com<\/a> in your web browser.<\/p>\n <\/p>\n DNS is an acronym of Domain Name System and it’s widely used in different mediums. As the name suggests, DNS is a naming system that gives a name to any computer or service connected to a network. DNS is utterly important and everyone should use it. Without it, we’d have to visit websites through their IP addresses, rather than their domain. So, for example, if you wanted to visit our website through it’s IP address, you’d have to go to 209.135.140.30. But with DNS, you can go to rosehosting.com . It’s easier to remember and it’s more user-friendly. That’s why people consider DNS \u201cthe phone book of the Internet\u201d. Nobody wants to remember an IP, but everyone can and does remember a domain name.<\/p>\n There’s lots of stuff going on \u201cbehind the scenes\u201d when you visit a website. There’s a communicating relationship between a few servers and your computer. These are the usual steps they take:<\/p>\n The DNS translation process stars when a user types in a domain name\/address in the URL bar of his web browser. With that, the user essentially requests the IP address of the domain and waits for a response.<\/p>\n After a user requests information on a domain, the user’s OS and browser check their local cache for any information on that domain. If the domain is already in the cache, the browser returns a positive response, if not, the Resolver needs to be contacted.<\/p>\n In most cases, the resolver is actually your ISP. First, the resolver checks to see if there’s any local data available. If not, he contacts the domain’s root server. What is a root server you ask? After a request is received for a domain, the domain’s root server checks the local cache for any information about the respective domain. If there is such, it responds with the IP, if not it points the resolver to the TLD server. The modus operandi of the root nameserver involves looking at the first part of the request, reading from right to left. So let’s use our website as an example again. In this case the root nameserver checks the request for rosehosting.com, sees that the TLD is com<\/strong> and forwards the query to the respective TLD nameservers.<\/p>\n The TLD nameservers review the next part of the request (rosehosting<\/strong>) and directs the inquiry to the nameservers responsible for rosehosting.com which are called authoritative DNS servers. These authoritative DNS servers contain all the information about RoseHosting.com<\/a> stored in DNS records. There are many types of records with each carrying a different kind of information. For example, if we want to know the IP address for google.com we need to know the A record for the domain.<\/p>\n Below is a list of some of the available DNS records which in general are mostly used:<\/p>\n With this short info on the DNS records out of our way, we can now continue with the article. Where were we? Ahh, yes.<\/p>\n The resolver now retrieves the A record for rosehosting.com from the authoritative DNS servers. The record is now stored in it’s local cache so if anyone else requests to visit the RoseHosting website, the resolver or (as others call it) recursive server will already have the answer so it won’t have to go through the above explained lookup process again. Of course depending on the TTL record set for the domain, the recursive server will have to ask for a new copy of the record to make sure that the information is up to date.<\/p>\n The resolver now has the A record for rosehosting.com and returns the info back to your computer. Your machine stores the record in the respective cache, reads the IP address from the record and then passes the information to your web browser. The browser opens a connection with the web server of rosehosting.com, receives and then displays our website on your screen.<\/p>\n Even though this process seems like it’s time consuming, it only takes milliseconds to complete.<\/p>\n Obviously, with this article we just covered the DNS basics, so you might want to check various articles on the Internet such as the Wikipedia DNS page<\/a> or anything else you find.<\/p>\n In one of our following tutorials we will cover the installation and configuration of a DNS service on one of our Linux (VPS) virtual private servers.<\/p>\nWhat is DNS?<\/h2>\n
How does DNS work?<\/h2>\n
1. The user enters the website’s domain in the address bar<\/strong><\/h3>\n
2. The browser and OS check their local cache<\/strong><\/h3>\n
3. The Resolver checks the local cache<\/strong><\/h3>\n
\nWell, a root server is a name server that covers the root zone of the Internet’s Domain Name System (DNS). It answers requests for records in the root DNS zone among other requests. For example if a request is received and asks what are the authoritative name servers for rosehosting.com it will return the authoritative name servers for the respective top-level domain (TLD). The root name servers are the first step in resolving human readable host names into IP addresses thus making them a critical part of the Internet infrastructure. There are thirteen root nameservers specified in the world. But don’t let this information scare you. It does not mean that there are only thirteen existing physical servers. They each have redundant equipment in place that provides reliable service even if failure of hardware or software occurs. Additionally, the root name servers operate in multiple geographical locations that use a routing technique called anycast addressing. Wikipedia’s definition for anycast addressing is: a network addressing and routing methodology in which datagrams from a single sender are routed to the topologically nearest node in a group of potential receivers, though it may be sent to several nodes, all identified by the same destination address.<\/p>\n4. The root server checks the local cache<\/strong><\/h3>\n
5. The root server forwards the resolver to the TLD server<\/strong><\/h3>\n
\n
6. Receiving the answer<\/strong><\/h3>\n
\n