<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ domain names - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ domain names - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Tue, 26 May 2026 10:37:26 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/domain-names/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ What is ANAME? ANAME Record DNS Tutorial ]]>
                </title>
                <description>
                    <![CDATA[ If you’ve ever had to make a domain name work with a website, you’ve probably seen ANAME as some record – just like the popular Canonical name record type or simply CNAME. CNAME and ANAME are both solutions for pointing a hostname to your website. Fo... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-aname-aname-record-dns-tutorial/</link>
                <guid isPermaLink="false">66adf266db5636c0b30cbaa0</guid>
                
                    <category>
                        <![CDATA[ dns ]]>
                    </category>
                
                    <category>
                        <![CDATA[ domain names ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Kolade Chris ]]>
                </dc:creator>
                <pubDate>Mon, 02 May 2022 18:02:19 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/04/alias-1.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>If you’ve ever had to make a domain name work with a website, you’ve probably seen ANAME as some record – just like the popular Canonical name record type or simply CNAME.</p>
<p>CNAME and ANAME are both solutions for pointing a hostname to your website. For example, <code>yourapp.netlify.com</code> to <code>yourwebsite.com</code>.</p>
<p>You’ve probably been using CNAME to make domain names point to websites. But instead, you can use an ANAME which has some added advantages because it gives you more flexibility.</p>
<p>In this article, you will learn what ANAME is, the advantages it has over CNAME, and when to use it.</p>
<h2 id="heading-what-is-aname">What is ANAME?</h2>
<p>ANAME, also called ALIAS, is a domain record type that can be used in place of a CNAME record. It's available from domain name companies such as Namecheap, GoDaddy, Hostinger, Google Domain, and more.</p>
<p>ANAME was born out of the combination of CNAME and another record type called A. So, ANAME is a CNAME and A record in one package.</p>
<p>ANAME is not a read DNS record but a way of simulating it. And that’s why it is called Alias name, or ANAME for short.</p>
<p>When you purchase a domain name and log in to its management panel, you will always see an option to use ANAME. </p>
<p>N.B.: Some domain name providers call it ALIAS instead of ANAME</p>
<p>Below is the Namecheap panel for managing domains and they call it ALIAS.
<img src="https://www.freecodecamp.org/news/content/images/2022/04/alias.png" alt="alias" width="600" height="400" loading="lazy"></p>
<h2 id="heading-how-does-aname-work">How Does ANAME Work?</h2>
<p>Just like CNAME, ANAME maps one domain name to another. So, an ANAME is configured to point to another domain. </p>
<p>When the domain name an ANAME points to is queried by the client browser, it responds with an IP address. A CNAME, on the other hand, cannot point to an IP address, but an ANAME can. This is one of the advantages ANAME has over CNAME.</p>
<p>In addition, another advantage ANAME has over CNAME is that it can coexist with other records on that domain name. So if you want to have subdomains, you should use ANAME instead of CNAME.</p>
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>This article explained what ANAME is and compared it with CNAME so you can know the advantages it has over CNAME.</p>
<p>You might also be wondering which to use between ANAME and CNAME, or when you should use one over the other.</p>
<p>This is the logic: </p>
<ul>
<li>if you know you cannot have other records on a domain name, use CNAME. This is because it cannot coexist with other data on the record for a domain name. </li>
<li>If you will have other records like subdomain on that domain name, then use ANAME. And if you don’t know whether you'll still have a subdomain or not, use ANAME.</li>
</ul>
<p>Thank you for reading.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is a Domain Name? Example Domains ]]>
                </title>
                <description>
                    <![CDATA[ A domain name is the address of a website. It's the name you type into a web browser to access that specific website. For example, the domain name for freeCodeCamp is freecodecamp.org. Domain names are important because they make it easy for people t... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-a-domain-name-example/</link>
                <guid isPermaLink="false">66b8d68157c651c38343a98c</guid>
                
                    <category>
                        <![CDATA[ domain names ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Quincy Larson ]]>
                </dc:creator>
                <pubDate>Mon, 04 Apr 2022 21:45:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/04/nubelson-fernandes-gTs2w7bu3Qo-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>A domain name is the address of a website. It's the name you type into a web browser to access that specific website. For example, the domain name for freeCodeCamp is freecodecamp.org.</p>
<p>Domain names are important because they make it easy for people to remember the address of your website. </p>
<p>Imagine what would happen if you had to remember the IP address for every website you wanted to visit. It would be a real pain to get around the web.</p>
<h2 id="heading-what-characters-can-go-in-a-domain-name">What Characters Can Go in a Domain Name?</h2>
<p>A domain name can be any combination of English alphabet letters (A-Z)  and numbers (0-9). </p>
<p>You can also use the dash character. For example, Class Central's domain was originally class-central.com, but they were able to buy classcentral.com without the dash, which looks more official, and is easier to type.</p>
<p>You can use these names in combination with various domain name extensions, such as .com, .net, and .org. These extensions are also called Top Level Domains or TLD's for short.</p>
<h2 id="heading-what-is-a-tld-top-level-domain-meaning-and-examples">What is a TLD? Top-Level Domain Meaning and Examples</h2>
<p>TLD stands for Top Level Domain. When the Domain Name System (DNS) first came online back in the 1980s, there were only a few TLDs: <strong>.com</strong>, <strong>.org</strong>, and <strong>.net</strong>.</p>
<p>In the US, there were also three TLDs that were heavily restricted and still are:</p>
<ul>
<li>.edu domains are only for accredited universities</li>
<li>.gov is only for US government organizations</li>
<li>.mil is only for the US military</li>
</ul>
<p>Many countries have their own TLDs. For example, the UK has .uk and .co.uk. You may have seen the .io TLD before – it is reserved for the British Indian Ocean Territory, but is popular with tech companies because the io is similar to I/O, or Input Output.</p>
<p>Other popular TLDs are .co (which is like .com, but for startups).</p>
<p>Note that .org is one of the original TLDs, and is designed for nonprofits. But in practice, anyone can register a .org domain. For example, Craigslist.org is a for-profit.</p>
<p>So be careful: just because a company is using a .org domain does not mean they are a tax-exempt nonprofit. (By the way, if you're wondering, freeCodeCamp is a tax-exempt nonprofit.)</p>
<h2 id="heading-how-do-you-register-a-domain-name">How do you register a domain name?</h2>
<p>When you register a domain name, you are essentially reserving that name for your own use. No one else can use that domain name as long as you continue to renew it. </p>
<p>And you will have to renew it each year with a domain registrar service. The annual fees for doing this can be anywhere from $12 for a .com domain to hundreds of dollars for some specialty domain names.</p>
<p>Domain names are typically registered through domain name registrars, such as Google Domains, Name.com, or Namecheap. The process is usually pretty simple and straightforward.</p>
<p>Once you've registered a domain name, you'll need to point it to your web hosting provider or your own servers. This will tell the domain name where to find your website.</p>
<h2 id="heading-now-you-know-the-basics-of-how-domain-names-work">Now you know the basics of how domain names work.</h2>
<p>I hope you've found this helpful. If you want to learn more about programming and technology, try <a target="_blank" href="https://www.freecodecamp.org/learn">freeCodeCamp's core coding curriculum</a>. It's free.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What is DNS? Domain Name System, DNS Server, and IP Address Concepts Explained ]]>
                </title>
                <description>
                    <![CDATA[ By Chloe Tucker Introduction By the end of this article, you should have a better understanding of: What DNS is and what it does What DNS servers do How Internet Protocol (IP) Addresses work in the context of DNS Important concepts There are some e... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-is-dns/</link>
                <guid isPermaLink="false">66d45e04aad1510d0766b5fb</guid>
                
                    <category>
                        <![CDATA[ nameserver ]]>
                    </category>
                
                    <category>
                        <![CDATA[ ARPANET ]]>
                    </category>
                
                    <category>
                        <![CDATA[ dns ]]>
                    </category>
                
                    <category>
                        <![CDATA[ domain names ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Mon, 11 May 2020 11:00:00 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2020/05/earth-3866609_1920.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Chloe Tucker</p>
<h2 id="heading-introduction">Introduction</h2>
<p>By the end of this article, you should have a better understanding of:</p>
<ol>
<li>What DNS is and what it does</li>
<li>What DNS servers do</li>
<li>How Internet Protocol (IP) Addresses work in the context of DNS</li>
</ol>
<h3 id="heading-important-concepts">Important concepts</h3>
<p>There are some essential mental models to be familiar with when learning about DNS, DNS servers, and IP addresses. Going over these concepts now, before starting to learn about DNS, will</p>
<ul>
<li>help make sense of all the different terms used to describe behavior that fits into these models, and</li>
<li>aid in memory retention.</li>
</ul>
<p>Mental models give you a frame of reference when things get a little weird and unfamiliar.</p>
<p>So let’s lay the groundwork.  </p>
<ul>
<li>Query and response. This is when Thing 1 asks Thing 2 for something, and Thing 2 responds to that request. Like this:</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Query-Response.jpg" alt="Query and response example" width="600" height="400" loading="lazy">
<em>Query and Response</em></p>
<ul>
<li>Parent-child node relationships and graphs that look like this (only more complicated).</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Parent-Child.jpg" alt="Parent and child node tree graphs" width="600" height="400" loading="lazy">
<em>Tree graph</em></p>
<ul>
<li>Messages. It’s not a query and response because there is no response. In the world of DNS, the formatting and content of messages vary according to usage.</li>
</ul>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Message.jpg" alt="Message example" width="600" height="400" loading="lazy">
<em>Message</em></p>
<ul>
<li>Client-server relationship. In simplest terms, a server is a software or hardware device that provides functionality for other software or hardware devices, called “clients.”   </li>
</ul>
<p>Prepare for a lot of talk about servers. As it turns out, there’s a whole lot of servers that go into this thing we call DNS, and how we, as humans, use it when we connect to the Internet.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Client-Server.jpg" alt="Server and clients example image" width="600" height="400" loading="lazy">
<em>Client-server relationship</em></p>
<h2 id="heading-what-is-dns">What is DNS?</h2>
<p>The Domain Name System (DNS) maps human-readable domain names (in URLs or in email address) to IP addresses. For example, DNS translates and maps the domain <a target="_blank" href="http://www.freecodecamp.org">freecodecamp.org</a> to the IP address 104.26.2.33.</p>
<p>To help you fully understand this description, this section details:</p>
<ul>
<li>Historical context for the development of DNS - what problems were it and IP addresses solving?</li>
<li>Domain names</li>
<li>IP addresses</li>
</ul>
<h3 id="heading-historical-context">Historical Context</h3>
<p>In 1966, the Advanced Research Projects Agency (ARPA), a US government agency, founded a computer network called ARPAnet. In simple terms, think of ARPAnet as the first iteration of what we now know today as the Internet.</p>
<p>The main goals of ARPAnet included </p>
<blockquote>
<p>“(1) providing reliable communication even in the event of a partial equipment or network failure, (2) being able to connect to different types of computers and operating systems and (3) being a cooperative effort rather than a monopoly controlled by a single corporation. In order to provide reliable communication in the face of equipment failure, ARPANET was designed so that no one point or link was more critical than any other. This was accompanied by the building of redundant routes and the use of on-the-fly rerouting of data if any <a target="_blank" href="http://www.linfo.org/arpanet.html">part of the network failed.</a>”</p>
</blockquote>
<h3 id="heading-the-problems">The Problems</h3>
<p>DNS and TCP/IP were critical in solving two issues with ARPAnet:</p>
<p><strong>For ARPAnet, there was a single location (a file called HOSTS.TXT) that contained all name-to-address mapping for every host on the network.</strong></p>
<blockquote>
<p>“HOSTS.TXT was maintained by SRI’s <em>Network Information Center</em> (dubbed “the NIC”) and distributed from a single host, SRI-NIC.[<a target="_blank" href="https://learning.oreilly.com/library/view/dns-and-bind/0596100574/ch01.html#ftn.dns5-CHP-1-FN1">*</a>] ARPAnet administrators typically emailed their changes to the NIC, and periodically FTP’ed to SRI-NIC and grabbed the current HOSTS.TXT file. Their changes were compiled <a target="_blank" href="https://learning.oreilly.com/library/view/dns-and-bind/0596100574/ch01.html">into a new <em>HOSTS.TXT</em> file once or twice a week.</a>”</p>
</blockquote>
<p>There were three challenges with this set-up:</p>
<ol>
<li>Traffic and load - distributing the file was becoming too much for the responsible host to handle.</li>
<li>Name collisions - each host had to have a unique name, and there was no centralized authority that prevented network users from adding a host with a conflicting (non-unique) name, thereby “breaking the whole scheme.”</li>
<li>Consistency - the act of updating the file and ensuring all hosts had the most updated version became impossible or at least very difficult.</li>
</ol>
<p>In essence, HOSTS.TX was a single point of failure, so the entire process here didn’t scale well past a certain number of hosts. ARPAnet needed a <em>decentralized</em> and scalable solution. DNS was it. <a target="_blank" href="https://learning.oreilly.com/library/view/dns-and-bind/0596100574/ch01.html">Source</a></p>
<p><strong>Host-to-host communication within the same network wasn’t reliable enough. TCP/IP helped solve this issue.</strong></p>
<ol>
<li>Transmission Control Protocol (TCP) provides quality assurance measures for the process of turning messages (between hosts) into packets. The TCP protocol is connection-oriented, which means a connection between source host and destination host must be established.</li>
<li>Internet Protocol (IP) defines how messages (packets) are carried between source host and destination host. An IP address is a unique identifier for a specific path that leads to a host on a network.</li>
<li>TCP and IP work closely together, which is why they’re usually referenced like “TCP/IP.”</li>
<li>While I won’t dive into it in this article, both TCP and User Datagram Protocol (UDP) are used in the data transport layer of DNS. UDP is faster, much less reliable, and doesn’t require connections; TCP is slower, much more reliable, but needs connections. They are used as needed and appropriate in DNS; needless to say, the inclusion of TCP in APRAnet was a valuable addition to the data transport layer.</li>
</ol>
<p>By the early 1980s, DNS and TCP/IP (and therefore, IP addresses) were standard operating procedures for the ARPAnet.</p>
<p>This history is <em>very</em> abridged. If you’d like to learn more about these topics, please reference the Resources section at the end of this article.</p>
<p>Now that we have some historical context, let’s move on to learning more about domain names and IP addresses.</p>
<h2 id="heading-domain-names">Domain Names</h2>
<p>In the context of DNS, a domain name provides a user-friendly way to point to non-local resources. This could be a website, a mail system, print server, or any other server that is available on the Internet. A domain name can be more than just a website!</p>
<blockquote>
<p>“The goal of domain names is to provide a mechanism for naming resources in such a way that the names are usable in different <a target="_blank" href="https://tools.ietf.org/html/rfc1035">hosts, networks, protocol families, internets, and administrative organizations.</a>”</p>
</blockquote>
<p>A domain name is much easier to remember and enter into a terminal or Internet browser, than an IP address.</p>
<p>A domain name is part of a Uniform Resource Locator (URL), but the terms are <em>not synonymous</em>. A URL is the complete web address of a resource, while the domain name is the name of a website and is a sub-component of every URL. </p>
<p>While there are technical distinctions between URLs and domain names, web browsers usually treat them the same way, so you’ll get to the website if you type in the complete web address, or just the domain name.</p>
<h3 id="heading-top-level-domains-and-second-level-domains">Top Level Domains and Second Level Domains</h3>
<p>There are two parts to any given domain: top-level domain (TLD) and second-level domain (SLD). The parts of a domain name become more specific when moving from the right (end) to the left (beginning). </p>
<p>This can be confusing at first. For example, let’s look at “freecodecamp.org”</p>
<ul>
<li>URL: https://www.freecodecamp.org</li>
<li>Domain name: freecodecamp.com</li>
<li>TLD: org</li>
<li>SLD: freecodecamp</li>
</ul>
<p>In the early days of ARPAnet, there were a limited number of TLDs available, including com, edu, gov, org, arpa, mil, and 2-letter country code domains. These TLDs were initially reserved for institutions participating in the ARPAnet, but some later became available on commercial markets. </p>
<p>Today, there is a comparative wealth of available TLDs, including net, aero, biz, coop, info, museum, name, and others.</p>
<p>Second-level domains are the domains that are available for individual purchase through domain registrars (for example, Namecheap).</p>
<h2 id="heading-ip-addresses">IP Addresses</h2>
<p>While IP addresses are related to DNS in their function, the Internet Protocol itself is technically separate from DNS. I’ve already provided historical context for this distinction, so now I’ll explain how IP addresses function.</p>
<p>An IP address, as previously mentioned, is a unique identifier for a specific path that leads to a host on a network. I’d like to reference the analogy of a phone number and a phone: a phone number doesn’t represent the phone itself, it’s just a way to reach the person with the phone. </p>
<p>This analogy is reasonably appropriate (at least, on a surface level), with IP addresses. An IP address represents an endpoint, but it isn’t the endpoint itself. IP assignments can be fixed (permanent) or dynamic (flexible and may be reassigned).</p>
<p>Like a domain name, the organization of IP addresses follows a hierarchical structure. Unlike domain names, IP addresses get more specific going left-to-right. This is an IPv4 example below:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/11/1-IPV4-Example.png" alt="Diagram of network and host portions of an IPv4 address" width="600" height="400" loading="lazy">
<em>This diagram shows that 129.144 is the network part and 50.56 is the host part of an IPv4 address.</em></p>
<ul>
<li>Network: the unique number assigned to your network</li>
<li>Host: identifies the host (machine) on the network</li>
</ul>
<p>If greater specificity is needed, <a target="_blank" href="https://docs.oracle.com/cd/E19683-01/806-4075/ipref-1/index.html">network administrators can subnet the address space and delegate additional numbers</a>.</p>
<h3 id="heading-how-many-ip-addresses-are-there">How many IP addresses are there?</h3>
<p>IPv4 was the very first iteration of IP that ARPAnet used in production. Deployed in the early 80s, it’s still the most prevalent IP version. It’s a 32-bit scheme, and can therefore support slightly over 4 billion addresses.</p>
<p>But wait, is that enough? Nope.</p>
<p>IPv6 has a 128-bit scheme, which allows it to support 340 undecillion addresses. It also offers performance improvements on IPv4.</p>
<p>Example IPv4 address: </p>
<ul>
<li>104.26.2.33 (freeCodeCamp)</li>
</ul>
<p>Example IPv6 address:</p>
<ul>
<li>2001:db8:a0b:12f0::1 (the compressed format and not pointing to freeCodeCamp)</li>
</ul>
<h1 id="heading-how-does-the-domain-name-system-work">How does the Domain Name System work?</h1>
<p>So, we’ve learned about domain names! We’ve learned about IP addresses! Now how do they relate to the Domain Name System?</p>
<p>First of all, they fit into the namespace.</p>
<h2 id="heading-the-domain-namespace">The Domain Namespace</h2>
<p>As implied by the language “top” level domain and “second” level domain, the namespace is based on a hierarchy </p>
<blockquote>
<p>“...with the hierarchy roughly corresponding to organizational structure, and names using "." as the character to mark the boundary between hierarchy levels.” <a target="_blank" href="https://tools.ietf.org/html/rfc1034">Source</a>. </p>
</blockquote>
<p>This tree graph, with the root at the top, best illustrates the structure:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2020/05/Namespace.jpg" alt="Root and namespace tree graph example" width="600" height="400" loading="lazy">
<em>The Namespace</em></p>
<p>Let’s break this down, starting at the top.</p>
<p>The top of this graph, noted with a “.” is called the “root.” </p>
<blockquote>
<p>“The authoritative name servers that serve the DNS root zone, commonly known as the “root servers”, are a network of hundreds of servers in many countries around the world. They are configured in the <a target="_blank" href="https://www.iana.org/domains/root/servers">DNS root zone as 13 named authorities.</a>”</p>
</blockquote>
<p>The root domain has a zero-length label.</p>
<p>From here-on down, each node (dot) in the graph has a unique label up to 63 characters long.</p>
<p>The first level down from the root are the TLDs: the com, org, edu, and gov. Please note that this graph does not contain a full list of TLDs.</p>
<p>Below TLDs are the SLDs, the second-level domains. The children of each node are called “subdomains,” which are still considered part of the parent domain. For example, in freecodecamp.org, freecodecamp (the SLD) is a subdomain of org (the TLD).</p>
<p>Depending on the hierarchy of the website, there may be third-, fourth, fifth- level domains. For example, in hypothetical-subdomain.freecodecamp.org, hypothetical-subdomain is the third-level domain, and the subdomain of freecodecamp. So on and so forth, at least up to 127 levels, which is the maximum allowed by DNS.</p>
<h3 id="heading-who-manages-the-namespace">Who manages the namespace?</h3>
<p>Wouldn’t it be nuts to try to have one person or organization administer everything? Yes, it would. Especially because one of the chief design goals of DNS was to promote distributed, decentralized management of the system at large.</p>
<p>I wish I could tell you the folks in charge are called the “Namespace Kings,” but alas.</p>
<p>Each domain (or subdomain) in the domain namespace is or is part of a <em>zone</em>, “an autonomously administered piece of the namespace.” So, the namespace is broken into zones.</p>
<p>Responsibility for those zones is managed through delegation and administration.</p>
<p>The process of assigning the responsibility of subdomains to other entities is called <em>delegation.</em> </p>
<p>For example, the Public Interest Registry administers the domain name org, and has since 2003. Public Interest Registry may delegate responsibility to other parties to manage subdomains of org, say freecodecamp. And then whoever administers freecodecamp may assign responsibility for the subdomains of freecodecamp (for example, hypothethical-subdomain.freecodecamp.com) to another party.</p>
<p>If someone (an organization, team, or individual) administers a zone, what they’re doing is administering the <a target="_blank" href="https://learning.oreilly.com/library/view/dns-and-bind/0596100574/ch01.html">nameserver that is responsible for the zone</a>.</p>
<p>This brings us into one of the most foundational concepts in the Domain Name System.</p>
<h2 id="heading-domain-name-servers">Domain Name Servers</h2>
<blockquote>
<p>“The programs that store information about the <a target="_blank" href="https://learning.oreilly.com/library/view/dns-and-bind/0596100574/ch02.html">domain namespace are called nameservers.</a>”</p>
</blockquote>
<p>At this point is where thinking about a client-server relationship, at least initially, is useful. Domain nameservers are the “server” side of the client-server relationship. Nameservers may load one, hundreds, or even thousands of zones, but they never load the entire namespace. Once a nameserver has loaded the totality of a zone, it is said to be <em>authoritative</em> for that zone.</p>
<p>To understand why nameservers function the way they do, it’s useful to understand the “client” part of the relationship.</p>
<h3 id="heading-resolvers">Resolvers</h3>
<p>In DNS, the client (the requester of information) is called the “resolver,” which may seem backward at first. Wouldn’t the server that is resolving the request be called the “resolver?” I thought so, too, but it’s not. Best to just memorize that and move on.</p>
<p>Resolvers are typically included, de facto, in most operating systems, so the applications installed on the OS don’t have to figure out how to make low-level DNS queries. </p>
<p>DNS queries and their responses are types of DNS messages, and have their own data transport protocol (usually UDP). Resolvers are responsible for helping applications installed on the OS translate requests for DNS-related data into DNS queries. </p>
<p>In sum, resolvers are responsible for packaging and sending off requests for data. Once the resolver receives the response (if at all), it passes that back to the original requesting application in a format consumable to the requesting application.</p>
<h3 id="heading-back-to-nameservers">Back to Nameservers</h3>
<p>Now that we are a bit more familiar with the client-side of the relationship, we need to understand how domain nameservers respond to resolver queries. </p>
<p>Nameservers respond to DNS queries through <em>resolution</em>. Resolution is the process by which nameservers find datafiles in the namespace. Depending on the type of query, nameservers respond differently to different queries, but the end goal is resolution.</p>
<h3 id="heading-query-types">Query Types</h3>
<p>Type of query? Yes, there are multiple types of DNS queries. But first, what’s usually in a DNS query? It’s a request for information, specifically for the IP address associated with a domain name.</p>
<ul>
<li><em>Recursive</em>: recursive queries allow the query to be referred on to multiple nameservers to be resolved. If the first queried nameserver doesn’t have the desired data, then that nameserver sends the query along to the most appropriate next nameserver, until the nameserver with the desired datafiles is found and sends a response to the resolver.</li>
<li><em>Iterative</em>: iterative queries require the queried nameserver to respond either with the desired data or with an error. The response may contain the IP address of the most appropriate nameserver to send the request to next; the resolver may then send another request to that, more appropriate, nameserver.</li>
</ul>
<p>In case you need it, you can also query for the domain name, if all you have is the IP address. This is called a reverse DNS lookup.</p>
<p>Once the query reaches a nameserver that contains the desired datafiles, then the query can be resolved. Nameservers have a number of datafiles associated with them, all or some of which may be used to resolve the query.</p>
<h3 id="heading-resource-records-rrs">Resource Records (RRs)</h3>
<p>These are the datafiles in the domain namespace. These datafiles have specific formats and contents.</p>
<p>The most common RRs:</p>
<ul>
<li>A Record: if you haven’t heard of any other RRs except for this one, that would make sense. It’s likely the best-known RR and contains the IP address of the given domain.</li>
<li>CNAME Record: if you haven’t heard of any other RRs except for this one and the A record, that would also make sense. The “C” stands for “canonical”, and is used instead of an A record, to assign an alias to a domain.</li>
<li>SOA Record: this record contains administrative information about the one, including the email address of the administrator. Hint: if you administer a zone, make sure there’s a valid email address here, so folks can get in touch with you if needed.</li>
<li>Other important Resource Record (RR) types are PR, NS, SRV, and MX. <a target="_blank" href="https://support.google.com/domains/answer/3251147?hl=en">Read about them here</a>.</li>
</ul>
<h3 id="heading-caching-and-time-to-live-ttl">Caching and Time to Live (TTL)</h3>
<p>When the local nameserver receives a response from a query, it caches that data (stores it in memory), so next time it receives the same query, it can just answer the query directly rather than go through the original, longer resolution process.</p>
<p>But once this information is cached, it is both static and isolated, and is therefore at risk of becoming out of date. Therefore, resource records all have what is called a <em>time to live</em> (TTL) value, which dictates how long that data can be cached. When that time runs out (reaches zero), the nameserver deletes the record.</p>
<p>Important note: TTL doesn’t apply to the name servers that are authoritative for the zone that contains the resource record. It just applies to the nameserver that cached that resource record.</p>
<h1 id="heading-a-day-in-the-life-of-a-query">A Day in the Life of a Query</h1>
<p>We’ve covered a lot of ground in this article, and it’s been heavy on the concepts. To tie this all together and make it real, here’s a day (figurative day) in the life of a query.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/11/2-Day-in-the-Life-of-a-Query.png" alt="Diagram showing how a query is resolved" width="600" height="400" loading="lazy">
<em><a target="_blank" href="https://www.oreilly.com/library/view/dns-and-bind/0596100574/ch02.html">Source</a></em></p>
<h1 id="heading-so-why-do-i-need-to-know-all-of-this">So why do I need to know all of this?</h1>
<p>There are so many reasons to be familiar with DNS and IP address related concepts.</p>
<ul>
<li>First, it’s a backbone of the Internet, the thing many of us use, develop feelings for (love/hate/you-name-it), and take for granted every day. It’s important to be familiar with the structures that enable us to accomplish great things today with technology and the Internet today.</li>
<li>Incredibly smart people spent decades of their lives building this stuff! Let’s acknowledge and appreciate their contributions.</li>
<li>Now that I got the gushy stuff out of the way, it’s important to be familiar with DNS concepts in case you’re responsible for anything relating to infrastructure in your company or team or your own business. Having a frame of reference when significant issues crop up allows you to act that much faster and find solutions that much sooner.</li>
</ul>
<h1 id="heading-conclusion">Conclusion</h1>
<p>At this point, you should understand what DNS is and what a nameserver is, as well as be familiar with technical concepts relating to IP addresses.</p>
<p>Many books have been written about and dive deeper into the fascinating world of DNS, and there is so much more to learn. The topics that were not included in this article but are either part of DNS or very related include:</p>
<ul>
<li>Nameserver implementations</li>
<li>Forwarding</li>
<li>(More about) node labels</li>
<li>Primary and secondary nameserver relationships</li>
<li>Retransmission algorithms</li>
<li>Load balancing</li>
<li>Plus, other more general topics about the how the Internet functions, like:</li>
<li>World Wide Web</li>
<li>HTTP</li>
<li>FTP</li>
<li>Communication protocol layers: link layer, IP layer, transport layer, Internet layer, etc.</li>
</ul>
<p>For those of you who are still reading and want to learn more about DNS, I first and foremost recommend “DNS and BIND, 5th Ed.”, written by Cricket Liu and published by O’Reilly Media. It’s invaluable. </p>
<p>I also encourage everyone to poke around in the original Request for Comments (RFCs) linked below. Not only are there points for reading primary sources, but they’re also exceptionally well-organized and comprehensible documents, which is why I quoted them in this article.</p>
<h1 id="heading-resources">Resources</h1>
<ol>
<li><a target="_blank" href="https://tools.ietf.org/html/rfc1034">RFC 1034: DOMAIN NAMES - CONCEPTS AND FACILITIES</a></li>
<li><a target="_blank" href="https://tools.ietf.org/html/rfc1035">RFC 1035: DOMAIN NAMES - IMPLEMENTATION AND SPECIFICATION</a></li>
<li><a target="_blank" href="https://tools.ietf.org/html/rfc1122">RFC 1122: Requirements for Internet Hosts -- Communication Layers</a></li>
<li><a target="_blank" href="https://ec2.freesoft.org/CIE/Course/Section2/5.htm">More about DNS Design Goals, from Connected: An Internet Encyclopedia</a></li>
<li><a target="_blank" href="https://theconversation.com/how-the-internet-was-born-from-the-arpanet-to-the-internet-68072">How the Internet was Born from the ARPAnet to the Interpret, from The Conversation</a></li>
<li><a target="_blank" href="https://learning.oreilly.com/videos/learning-dns/9781771373692?autoplay=false">Learning DNS Video Course, by Cricket Liu, from O'Reilly Media</a></li>
</ol>
<h3 id="heading-a-bit-about-me">A bit about me</h3>
<p>I'm Chloe Tucker, an artist and developer in Portland, Oregon. As a former educator, I'm continuously searching for the intersection of learning and teaching, or technology and art. Reach out to me on Twitter <a target="_blank" href="https://twitter.com/_chloetucker">@_chloetucker</a> and check out my website at <a target="_blank" href="https://chloe.dev/">chloe.dev</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
