{"id":226,"date":"2022-05-16T17:50:13","date_gmt":"2022-05-16T15:50:13","guid":{"rendered":"https:\/\/www.domainsearchall.com\/guides\/?p=226"},"modified":"2024-09-20T19:31:15","modified_gmt":"2024-09-20T17:31:15","slug":"what-is-dns","status":"publish","type":"post","link":"https:\/\/www.domainsearchall.com\/guides\/what-is-dns\/","title":{"rendered":"What is DNS?"},"content":{"rendered":"<h2>What is DNS?<\/h2>\n<p>The Internet&#8217;s phonebook is called the <a href=\"https:\/\/www.domainsearchall.com\/guides\/dns-explained-in-computer-networks\/\">Domain Name System<\/a> (DNS). <a href=\"https:\/\/www.domainsearchall.com\/guides\/understanding-different-types-of-domain-names\/\">Domain names<\/a> allow humans to access online information, such as espn.com and nytimes.com. Internet Protocol (IP), addresses are used by web browsers to interact with the Internet Protocol. DNS converts domain names into IP addresses so that browsers can load Internet resources. Every device connected to the Internet is assigned a unique IP address that other machines can use to locate it. DNS servers eliminate the need for humans to memorize IP addresses such as 192.168.1.1 (in IPv4), or more complex newer alphanumeric IP addresses such as 2400:cb00:2048:1::c629:d7a2 (in IPv6).<\/p>\n<h2>How does DNS work?<\/h2>\n<p><a href=\"https:\/\/www.domainsearchall.com\/guides\/top-domain-name-servers-for-businesses\/\">DNS resolution<\/a> is the conversion of a hostname, such as www.example.com, into a computer-friendly IP address (such 192.168.1.1). Each device connected to the Internet is assigned an IP address. This address allows them to locate the correct device. It is similar to a street address that is used to locate a house. A translation must be made between the user&#8217;s input (example.com), and the machine-friendly address needed to locate example.com webpage. Understanding the <a href=\"https:\/\/www.domainsearchall.com\/guides\/how-dns-server-works\/\">DNS resolution process<\/a> is important. It&#8217;s essential to know about the hardware components that a DNS query must pass through. The DNS lookup is done &#8220;behind the scenes&#8221; by the web browser and does not require any interaction beyond the initial request.<\/p>\n<h2>Four DNS servers are\u00a0involved in loading a website:<\/h2>\n<ul>\n<li><strong>DNS recursor<\/strong>: The recursor is a kind of\u00a0librarian who is asked to\u00a0locate a book\u00a0in a library.\u00a0DNS recursor &#8211; This server is designed to respond to queries sent by clients via\u00a0web browsers.\u00a0The recursor will typically make additional requests\u00a0to satisfy the\u00a0DNS query of the client.<\/li>\n<li><strong>Root nameserver<\/strong> \u2013\u00a0The root server is\u00a0responsible for translating human-readable\u00a0host names into IP addresses.\u00a0It is\u00a0like an index in a\u00a0book\u00a0that points to\u00a0various\u00a0racks of books.\u00a0It serves as a reference\u00a0point\u00a0to other locations.<\/li>\n<li><strong>TLD nameserver<\/strong> \u2013 The <a href=\"https:\/\/www.domainsearchall.com\/guides\/understanding-premium-domain-names\/\">top-level domain<\/a> server (TLD), can be compared to a particular rack of books in a library. This nameserver hosts the final portion of the hostname. In example.com, it is &#8220;com&#8221;.<\/li>\n<li><strong>Authoritative nameserver<\/strong>: This last nameserver can be compared to a dictionary in a stack of books that can translate a particular name into its definition. The authoritative nameserver is where the nameserver query ends. If the authoritative server has access, it will provide the IP address of the requested hostname back to the DNS Recursor (the librarian), that received the initial request.<\/li>\n<\/ul>\n<h2>What is the difference between an authoritative DNS server and a recursive DNS solver?<\/h2>\n<p>Both terms\u00a0refer to servers (groups\u00a0or\u00a0servers) that are\u00a0part of\u00a0the DNS infrastructure. However, each server\u00a0performs a different\u00a0function\u00a0and lives in different\u00a0places within the\u00a0DNS query pipeline.\u00a0The recursive resolver is\u00a0located\u00a0at the beginning of\u00a0a DNS query, while\u00a0the authoritative nameserver is\u00a0located\u00a0at the end.<\/p>\n<h3>Recursive DNS resolver<\/h3>\n<p>Recursive resolvers are computers that respond to recursive requests from clients and take the time to find the DNS record. It makes a series of requests to reach the authoritative DNS nameserver for the requested records. If no record is found, it will return an error or times out. Recursive DNS resolvers don&#8217;t always have to make multiple requests to find the records required to reply to clients. Instead, caching is a data persistence process that helps to shorten the time between requests by serving the requested resource earlier in the DNS lookup.<\/p>\n<h3>Server for authoritative DNS<\/h3>\n<p>An authoritative DNS server, in simple terms, is a server that holds and manages DNS resource records. This is the DNS server that responds to the query with the resource record. It allows the web browser to request the IP address to access the website or other web resources. Because it is the last source of truth for certain DNS records, an authoritative nameserver can answer queries using its own data. It is worth noting that in cases where the query is for a subdomain, such as foo.example.com and blog.cloudflare.com a second nameserver will be added after the authoritative nameserver. This is responsible for storing the subdomain&#8217;s CNAME records.<\/p>\n<p>Cloudflare offers a unique DNS service that is different from many others. OpenDNS, Google DNS, and Comcast all have data center installations of DNS Recursive Resolvers. These resolvers enable quick and simple queries through optimized clusters and DNS-optimized computer system systems. However, they are fundamentally different from the nameservers hosted on Cloudflare. Cloudflare has infrastructure-level nameservers which are essential to the operation of the Internet. Cloudflare partially hosts the froot server network. This is a key example. F-root is a root-level DNS nameserver infrastructure component that handles billions of Internet requests each day. We are able to handle large volumes without interruption of service thanks to our Anycast network.<\/p>\n<h2>What are the steps involved in a DNS lookup?<\/h2>\n<p>DNS refers to the translation of a domain name into an IP address. It is helpful to trace the DNS lookup&#8217;s journey from a web browser through the <a href=\"https:\/\/www.domainsearchall.com\/guides\/what-is-a-top-level-domain-tld\/\">DNS lookup process<\/a> and back again. Let&#8217;s look at the steps. Not all\u00a0DNS lookup information\u00a0is stored locally on the querying machine\u00a0or remotely in the DNS infrastructure.\u00a0A DNS lookup\u00a0typically involves 8 steps.\u00a0The DNS lookup process\u00a0is faster\u00a0when DNS information\u00a0has been cached.\u00a0Here&#8217;s an example of the 8 steps that are skipped when no cached DNS information is available.<\/p>\n<h2>These are\u00a0the 8 steps\u00a0to\u00a0a DNS lookup<\/h2>\n<ol>\n<li>When a user typed &#8220;example.com&#8221;\u00a0into a web browser, the query traveled\u00a0to the Internet and\u00a0was\u00a0received by a DNS Recursive Determiner.<\/li>\n<li>The resolver queries the\u00a0DNS root nameserver (.\u00a0).<\/li>\n<li>The root server\u00a0responds to the resolver\u00a0by displaying\u00a0the address of a Top Level Domain\u00a0DNS\u00a0(TLD) DNS Server (such as.com and.net). This server stores information about\u00a0its domains.\u00a0Our request\u00a0for example.com\u00a0is directed to the.com TLD.<\/li>\n<li>The resolver then\u00a0requests the.com TLD.<\/li>\n<li>The TLD server\u00a0responds then\u00a0with the IP address\u00a0for\u00a0the domain&#8217;s nameserver (example.com).<\/li>\n<li>Finally, the recursive solver sends a query to the domain&#8217;s nameserver.<\/li>\n<li>The resolver then returns\u00a0the IP address\u00a0of\u00a0example.com\u00a0to the nameserver.<\/li>\n<li>The DNS resolver\u00a0responds to the\u00a0browser with the IP address\u00a0for the domain that was requested originally.<\/li>\n<\/ol>\n<p>After\u00a0the DNS lookup\u00a0has completed 8 steps, the browser\u00a0can make a\u00a0request for the\u00a0requested web page.<\/p>\n<ol>\n<li>The browser sends an\u00a0HTTP request to the IP address.<\/li>\n<li>Step 10:\u00a0The server at\u00a0this\u00a0IP returns the webpage\u00a0that will\u00a0be rendered in the browser<\/li>\n<\/ol>\n<h2>What is DNS resolution?<\/h2>\n<p>The DNS resolver is the first\u00a0step\u00a0in the DNS lookup.\u00a0It is responsible for dealing\u00a0directly\u00a0with the client\u00a0who\u00a0made the initial request.\u00a0The DNS resolver initiates\u00a0the sequence of queries that\u00a0eventually leads to the\u00a0URL being translated into\u00a0an\u00a0IP address.<\/p>\n<p>Notice: An\u00a0uncached DNS lookup\u00a0can include both iterative and recursive queries.<\/p>\n<p>It is important to distinguish between a DNS query that is recursive and one that is recursive. A query is a request for a DNS resolution that requires the resolution of the query. DNS recursive resolvers are computers that receive a recursive question and process it by making the required requests.<\/p>\n<h2>What are the\u00a0different\u00a0types of DNS queries?<\/h2>\n<p>Three types of queries\u00a0are possible in a DNS lookup.\u00a0A combination of these queries\u00a0can optimize DNS resolution and reduce the\u00a0distance traveled.\u00a0A perfect situation will have cached data, which allows a DNS\u00a0server to return a\u00a0nonrecursive query.<\/p>\n<h3>There are three\u00a0types of DNS queries<\/h3>\n<ol>\n<li><strong>Recursive query<\/strong>:\u00a0A DNS client\u00a0will ask for\u00a0a DNS server\u00a0to respond with\u00a0the requested resource record,\u00a0or an error message if\u00a0it\u00a0can&#8217;t.<\/li>\n<li><strong>Iterative query<\/strong> \u2013\u00a0In this case,\u00a0the DNS client will\u00a0give the DNS server\u00a0the best answer possible.\u00a0If the query\u00a0DNS server doesn&#8217;t have a match, it will\u00a0refer the query\u00a0to a DNS server authoritative\u00a0at a lower\u00a0domain namespace level.\u00a0The DNS client will then\u00a0send\u00a0a query to\u00a0this address.\u00a0The process continues until an error occurs or a\u00a0timeout occurs.<\/li>\n<li><strong>Non-recursive queries<\/strong> &#8211; this is\u00a0when a DNS resolver client\u00a0asks\u00a0a DNS server\u00a0to retrieve a record\u00a0it has access to. It can either be\u00a0authoritative for the record, or it exists in\u00a0its cache.\u00a0A DNS server will\u00a0typically\u00a0cache DNS records to\u00a0reduce\u00a0bandwidth consumption and load on\u00a0downstream servers.<\/li>\n<\/ol>\n<h2>What is DNS caching?\u00a0What is DNS caching?<\/h2>\n<p>Caching temporarily stores\u00a0data in a location that\u00a0improves\u00a0performance and reliability\u00a0when data requests are made.\u00a0<a href=\"https:\/\/www.domainsearchall.com\/guides\/understanding-dns-for-domain-names\/\">DNS caching<\/a> is the temporary storage of data near the client to resolve DNS queries earlier.\u00a0Additional queries further down the DNS lookup\u00a0chains\u00a0can be avoided. This can improve\u00a0load times and\u00a0reduce\u00a0bandwidth\/CPU usage.\u00a0DNS data can be\u00a0stored in many locations. Each location\u00a0will store DNS records for a\u00a0specific time period\u00a0determined by a time\u00a0to\u00a0live (TTL).<\/p>\n<h3>Caching DNS for browsers<\/h3>\n<p>Modern web browsers automatically cache DNS records for a certain time. This is clear: the DNS cache must be located closer to the browser to allow for fewer steps to verify the cache and send the correct requests to the IP address. The browser cache is checked first for any DNS records when a request for one is made. In Chrome, you can see the status of your DNS cache by going to chrome:\/\/net-internals\/#dns.<\/p>\n<h3>DNS caching at the OS level<\/h3>\n<p>The DNS resolver at the operating system level is the last stop before a DNS query leaves your computer. This query-handling process is known as a &#8220;stub solver&#8221; or DNS client. A stub resolver receives a request from an app. It first checks its cache to determine if it has that record. If it doesn&#8217;t, it sends a DNS query outside of the local network to an ISP DNS recursive solver. The ISP&#8217;s recursive resolver will receive a DNS query. Like all other steps, it will also check if the requested host-to-IP-address translation has been stored within its local persistence layer. Recursive resolvers also have additional functionality depending on the type of records they have in their cache.<\/p>\n<ol>\n<li>If the resolver doesn&#8217;t have the A records but has the NS records for authoritative nameservers it will query these <a href=\"https:\/\/www.domainsearchall.com\/guides\/how-to-access-the-whois-database-for-domain-lookups\/\">name servers<\/a> directly. This bypasses several steps in the DNS query. This prevents the resolver from looking up the root and.com nameservers (in our search to find example.com) and speeds up the <a href=\"https:\/\/www.domainsearchall.com\/guides\/beginners-guide-to-configuring-domain-name-system\/\">DNS query resolution<\/a>.<\/li>\n<li>If the resolver doesn&#8217;t have the NS records it will send a query to the TLD servers (.com for our case) and skip the root server.<\/li>\n<li>If\u00a0the resolver doesn&#8217;t have records pointing\u00a0at\u00a0the TLD servers\u00a0it will\u00a0query the root servers.\u00a0This happens\u00a0after a DNS cache\u00a0is deleted.<\/li>\n<\/ol>\n<div class=\"video-container\"><iframe width=\"800\" height=\"450\" src=\"https:\/\/www.youtube.com\/embed\/9d0iu2Q6iMU\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The Internet&#8217;s phonebook is called\u00a0the Domain Name System (DNS).\u00a0Domain names allow humans to access online information, such as\u00a0espn.com\u00a0and\u00a0nytimes.com.<\/p>\n","protected":false},"author":2,"featured_media":1850,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"default","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1607,1609],"tags":[1967,2035,2039],"class_list":["post-226","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-basics","category-management","tag-dns","tag-ip","tag-resolver"],"_links":{"self":[{"href":"https:\/\/www.domainsearchall.com\/guides\/wp-json\/wp\/v2\/posts\/226","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.domainsearchall.com\/guides\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.domainsearchall.com\/guides\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.domainsearchall.com\/guides\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.domainsearchall.com\/guides\/wp-json\/wp\/v2\/comments?post=226"}],"version-history":[{"count":0,"href":"https:\/\/www.domainsearchall.com\/guides\/wp-json\/wp\/v2\/posts\/226\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.domainsearchall.com\/guides\/wp-json\/wp\/v2\/media\/1850"}],"wp:attachment":[{"href":"https:\/\/www.domainsearchall.com\/guides\/wp-json\/wp\/v2\/media?parent=226"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.domainsearchall.com\/guides\/wp-json\/wp\/v2\/categories?post=226"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.domainsearchall.com\/guides\/wp-json\/wp\/v2\/tags?post=226"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}