{"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":"
<\/div>

\"What<\/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

What is DNS?<\/h2>\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

How does DNS work?<\/h2>\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

1. The user enters the website’s domain in the address bar<\/strong><\/h3>\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

2. The browser and OS check their local cache<\/strong><\/h3>\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

3. The Resolver checks the local cache<\/strong><\/h3>\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?
\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>\n

4. The root server checks the local cache<\/strong><\/h3>\n

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

5. The root server forwards the resolver to the TLD server<\/strong><\/h3>\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