<?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" version="2.0"><channel><title><![CDATA[DNS Records: How Websites Are Found]]></title><description><![CDATA[DNS Records: How Websites Are Found]]></description><link>https://dns-records-how-websites-are-found.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Thu, 25 Jun 2026 21:23:05 GMT</lastBuildDate><atom:link href="https://dns-records-how-websites-are-found.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Understanding DNS Records: How the Internet Finds Your Website]]></title><description><![CDATA[Introduction
This blog explains how a browser knows where a website lives. We use websites every day, but we rarely think about how a website actually loads or what happens behind the scenes.
When we type google.com, the browser doesn’t understand na...]]></description><link>https://dns-records-how-websites-are-found.hashnode.dev/understanding-dns-records-how-the-internet-finds-your-website</link><guid isPermaLink="true">https://dns-records-how-websites-are-found.hashnode.dev/understanding-dns-records-how-the-internet-finds-your-website</guid><category><![CDATA[browser]]></category><category><![CDATA[dns-records]]></category><category><![CDATA[dns server]]></category><dc:creator><![CDATA[Amardeep Kumar]]></dc:creator><pubDate>Tue, 20 Jan 2026 13:02:18 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769775829737/8a89cfd4-152e-4448-9dee-bf36c9dae66f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<hr />
<h2 id="heading-introduction">Introduction</h2>
<p>This blog explains <strong>how a browser knows where a website lives.</strong> We use websites every day, but we rarely think about how a website actually loads or what happens behind the scenes.</p>
<p>When we type <a target="_blank" href="https://google.com"><code>google.com</code></a>, the browser <strong>doesn’t understand names</strong>, Computers and networks only understand <strong>numbers (IP addresses).</strong></p>
<h2 id="heading-what-is-dns">What is DNS?</h2>
<p><strong>DNS (Domain Name System)</strong> is like the phonebook of the internet. We usually think that when we type a website name (Domain name) into the browser, the browser directly loads the website.<br />But the browser cannot load a website by name.</p>
<p>After typing the domain name, the browser first goes to <strong>DNS</strong> and asks: <em>What is the IP address of this domain?</em></p>
<p>DNS replies with the IP address of the website, and <strong>only then</strong> the browser can connect to the server.</p>
<p><strong>A real-life example:</strong></p>
<p>When you want to call someone, you type a name, not a number.<br />But your phone <strong>does not understand names</strong>, it actually calls the <strong>phone number</strong> saved behind that name.</p>
<p>The same thing happens on the internet.</p>
<ul>
<li><p>Browser understands: <a target="_blank" href="https://google.com"><code>142.250.206.14</code></a></p>
</li>
<li><p>Humans understand: <a target="_blank" href="http://google.com"><code>google.com</code></a></p>
</li>
</ul>
<pre><code class="lang-abap">google.com → <span class="hljs-number">142.250</span>.<span class="hljs-number">206.14</span>
</code></pre>
<p>You don’t need to remember IP addresses, DNS handles everything internally.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768913333808/fa5e9126-a69c-4cb5-b993-904c0838ca24.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-why-dns-records-are-needed">Why DNS records are needed</h2>
<p>DNS does not use only for searching the IP addresses. A domain name needs many different instructions:</p>
<ul>
<li><p>Where the website is hosted</p>
</li>
<li><p>Which server handles emails</p>
</li>
<li><p>How security and verification work</p>
</li>
<li><p>How traffic can be distributed (load balancing)</p>
</li>
</ul>
<h3 id="heading-what-are-dns-records">What Are DNS Records?</h3>
<p>A DNS record is a set of <strong>rules or instructions</strong>. These instructions tell the DNS server <strong>what to do with a domain</strong>. You can think of DNS records as entries inside the internet’s phonebook.</p>
<p><strong>Just simple comparison:</strong></p>
<p>A phonebook entry contains some record like</p>
<ul>
<li><p>Name</p>
</li>
<li><p>Phone number</p>
</li>
</ul>
<p>Same thing with DNS records, it contains</p>
<ul>
<li><p>Domain or subdomain name</p>
</li>
<li><p>Record type (A, AAAA, MX, CNAME, etc.)</p>
</li>
<li><p>IP address or server name</p>
</li>
<li><p>TTL (how long the record is cached)</p>
</li>
</ul>
<p>Each record solves some specific problem. That’s why DNS records are needed. Now explain each record one by one.</p>
<h2 id="heading-what-is-an-ns-record">What is an <strong>NS Record</strong>?</h2>
<p><strong>NS (Name Server) record</strong> – NS record doesn’t give an IP of a Domain name. It tells which DNS server is responsible for that Domain. without NS DNS doesn’t know whom to ask. it is a first step in DNS resolution.</p>
<p><strong>Real-Life Example:</strong></p>
<p>Imagine a society with many buildings. If you want any information about that society, you first ask: Where is the society office?</p>
<p>The society office doesn’t give you the flat number directly, but it tells you where to get the correct details. That’s exactly what an NS record does.</p>
<h2 id="heading-what-is-an-a-record">What is an <strong>A Record</strong>?</h2>
<p>An <strong>A record</strong> stores the exact address of a website. It connects a domain name to an IPv4 address.</p>
<p>After DNS finds the A record, the browser finally knows where to go to load the website.</p>
<p>In simple words: domain name → IPv4 address</p>
<hr />
<p><strong>what is IPv4?</strong></p>
<p>IPv4 stands for internet protocol version 4. it uses <strong>32 bits</strong>, which means it can create: 2³² ≈ 4.3 billion IP addresses.</p>
<p>That’s why IPv4 addresses looks like this: <code>142.250.206.14</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768913563475/e7b87f3f-7e7b-4632-9091-63c6d5ce2906.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-what-is-an-aaaa-record">What is an <strong>AAAA Record</strong>?</h2>
<p>An <strong>AAAA record</strong> works exactly like an A record, but it stores an IPv6 address instead of an IPv4 address.</p>
<p>In simple terms: domain name → IPv6 address</p>
<p>The only difference between <strong>A</strong> and <strong>AAAA</strong> records is the <strong>IP version.</strong></p>
<hr />
<p><strong>What is IPv6?</strong></p>
<p>IPv6 stands for internet protocol version 6. it uses <strong>128 bits</strong>, which means it create: 2^128 IP addresses. This number is extremely large, So IPv6 addresses are considered almost infinite.</p>
<p>And the format of IPv6 addresses looks like this: <code>2001:0db8:85a3:0000:0000:8a2e:0370:7334</code></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768913609726/967d3d31-b348-4a37-bb6e-a0d059f3214e.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-what-is-a-cname-record">What is a <strong>CNAME Record?</strong></h2>
<p>A <strong>CNAME (Canonical Name) record</strong> points one domain name to another domain name. It does not point to an IP address. it tells DNS: This name is an alias of another name.</p>
<p>In simple terms: one domain → another domain → IP address</p>
<hr />
<p><strong>Why is CNAME Record Used?</strong></p>
<p>CNAME records are useful when multiple domain names should point to the same website.</p>
<p>If the main domain’s IP address changes, you only update the <strong>A record of the main domain</strong>.<br />All subdomains using CNAME will automatically work without any change.</p>
<p>For example:</p>
<pre><code class="lang-apache"><span class="hljs-attribute">example</span>.com -&gt; <span class="hljs-number">142.250.206.14</span>
<span class="hljs-attribute">example2</span>.com -&gt; CNAME -&gt; example.com
<span class="hljs-attribute">www</span>.example.com -&gt; CNAME -&gt; example.com
</code></pre>
<p>It used for easy DNS management.</p>
<h2 id="heading-what-is-an-mx-record">What is an <strong>MX Record</strong>?</h2>
<p>An <strong>MX (Mail Exchange) record</strong> is used only for emails. It has no direct relation to loading a website. The MX record tells the internet which mail server should receive emails for a domain.</p>
<p>In simple words: If someone sends an email to this domain, where should it go?</p>
<hr />
<p><strong>How MX Record Works</strong></p>
<p>When an email is sent to an address like: user@example.com</p>
<p>The email system:</p>
<ol>
<li><p>Checks the <strong>MX record</strong> of <a target="_blank" href="http://example.com"><code>example.com</code></a></p>
</li>
<li><p>Finds the mail server address</p>
</li>
<li><p>Delivers the email to that server</p>
</li>
</ol>
<p>Even if the IP address changes, emails will still go to the correct mail server. MX records control email delivery, not websites.</p>
<h2 id="heading-what-is-a-txt-record">What is a <strong>TXT Record</strong>?</h2>
<p>A <strong>TXT record</strong> is plain text that contains some information about the domain. There is no relation to loading a website.</p>
<p>It is mainly used to share extra information about the domain with other services, especially for security and verification purposes.</p>
<p>It used for:</p>
<ul>
<li><p>Domain verification</p>
</li>
<li><p>Email security</p>
</li>
<li><p>Ownership proof</p>
</li>
</ul>
<h2 id="heading-how-all-dns-records-work-together-for-one-website">How all DNS records work together for one website</h2>
<p>For a particular domain each DNS record work something. and they work together; each record solves one specific question about the domain.</p>
<p>For example:</p>
<table><tbody><tr><td><p>Who manages domain</p></td><td><p>NS</p></td></tr><tr><td><p>Where is the website hosted</p></td><td><p>A / AAAA</p></td></tr><tr><td><p>alias name (sub domain)</p></td><td><p>CNAME</p></td></tr><tr><td><p>Email delivery</p></td><td><p>MX</p></td></tr><tr><td><p>Verification</p></td><td><p>TXT</p></td></tr></tbody></table>

<p>Now we understand how DNS records actually work.</p>
<ul>
<li><p>A browser asks DNS for the IP of the domain <a target="_blank" href="https://google.com"><code>google.com</code></a></p>
</li>
<li><p><strong>NS record</strong> tells which DNS server is responsible</p>
</li>
<li><p>If <a target="_blank" href="http://google.com"><code>www.google.com</code></a> is used, <strong>CNAME</strong> points it to the main domain</p>
</li>
<li><p>DNS checks the <strong>A / AAAA record</strong> to find the website IP</p>
</li>
<li><p>Browser connects to the server and loads the website</p>
</li>
<li><p>If someone sends an email: <strong>MX record</strong> handles email routing</p>
</li>
<li><p><strong>TXT records</strong> help with security and verification for the domain</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1768913818509/2171858d-efc0-4c07-b2b2-cc99b461d56a.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>So, this is everything about DNS records, what each record does, and how all the records work together for a website. These records ensure that a website loads correctly and emails are delivered to the right place. It is important to remember that the internet only understands IP addresses.</p>
]]></content:encoded></item></channel></rss>