<?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[Explore WebDev]]></title><description><![CDATA[Explore WebDev]]></description><link>https://explore-webdev.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Tue, 20 Oct 2026 09:51:29 GMT</lastBuildDate><atom:link href="https://explore-webdev.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Understanding HTML Tags and Elements]]></title><description><![CDATA[When you search a website, you get a page that has some styling design and buttons, but before styling and functionality, there is something else, yes, you…]]></description><link>https://explore-webdev.hashnode.dev/understanding-html-tags-and-elements</link><guid isPermaLink="true">https://explore-webdev.hashnode.dev/understanding-html-tags-and-elements</guid><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[devjourneywithme]]></category><category><![CDATA[Explore Webdev]]></category><category><![CDATA[HTML5]]></category><dc:creator><![CDATA[Rahul Kumar]]></dc:creator><pubDate>Wed, 28 Jan 2026 18:43:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769625800415/0a03c129-c606-46db-ac87-13c92f01b34d.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-introduction">INTRODUCTION</h1>
<p>When you search a website, you get a page that has some styling design and buttons, but before styling and functionality, there is something else, yes, you are thinking correctly, it’s <strong>the structure</strong>.<br />Every design needs a structure before any colouring, and every website needs a structure before it can be functional.</p>
<p>Now you might be thinking, who provides this structure? If you’re thinking, let’s begin this blog.</p>
<p>A website is composed of three primary elements: HTML, CSS, and JavaScript.<br />Think of it like:-</p>
<blockquote>
<p>🧱 HTML = Skeleton of a webpage<br />🎨 CSS = Skin &amp; clothes<br />🧠 JavaScript = Brain &amp; logic</p>
</blockquote>
<p>Let’s understand HTML and its need.</p>
<h1 id="heading-what-is-html-and-why-do-we-use-it">What is HTML and Why Do We Use It?</h1>
<p>HTML stands for Hyper Text Markup Language. Before understanding HTML, we need to understand the problem with normal text.<br />Before websites, computers used to store and share text files, reports and documents. But the problem is, it is simply plain text; there is no structure in those files, so it is very difficult to understand the actual meaning of the text because paragraphs, new lines, bold and highlighting everything have a meaning that the reader can understand. To solve this problem, world wide web (www) created a language known as HTML.</p>
<p>Its name is Hypertext Markup Language. The hypertext solves the problem of linking between the 2 documents or files by using hyper links we can connect two files or document that is why its name is Hypertext.<br />Markup means marking content with meaning because each tag has its own semantic meaning that how using that tag in HTML markup affects the content.<br />It is a language because it provides a structure which computer can understand, which is why it is known as a language<br />So HTML literally means:</p>
<blockquote>
<p><strong>A language to mark text so it can be linked and structured</strong></p>
</blockquote>
<h1 id="heading-what-is-an-html-tag">What is an HTML tag?</h1>
<p>Before understanding what an HTML tag is, we need to understand why we need it.<br />The need of html tag is that even though we have HTML, it is just simple text, so the problem is how browsers know which one is a tag and which one is text. To solve this problem www create a symbol known as a tag.</p>
<p>Now, an <strong>HTML tag</strong> is a special keyword written inside angle brackets <code>&lt; &gt;</code> that tells the browser <strong>what a piece of content is</strong>.</p>
<p>An HTML tag’s structure is:-</p>
<pre><code class="lang-plaintext">&lt;tagname&gt;
</code></pre>
<p>Tags are of two types:-</p>
<p>a) Opening tag:-</p>
<blockquote>
<p>It helps the browser to understand where a particular tag starts.</p>
<p>It is written like &lt;tagname&gt;</p>
</blockquote>
<p>b) Closing tag:-</p>
<blockquote>
<p>It helps the browser to understand where a particular tag ends.</p>
<p>It is written like &lt;/tagname&gt;</p>
</blockquote>
<p>Between these two tags, we have content:-</p>
<pre><code class="lang-plaintext">&lt;h1&gt;This is a heading&lt;/h1&gt;
</code></pre>
<p>content- <code>This is a heading</code></p>
<h1 id="heading-what-an-html-element-means">What an HTML element means</h1>
<p>When all the 3 component, the opening tag, the content, and the closing tag, get together and make a structure, it is known as an HTML element. It is called an element because it is the basic building block of a website.</p>
<h2 id="heading-tag-vs-element-very-important">Tag vs Element (Very Important)</h2>
<h3 id="heading-tag">Tag:</h3>
<pre><code class="lang-plaintext">&lt;p&gt;
</code></pre>
<h3 id="heading-element">Element:</h3>
<pre><code class="lang-plaintext">&lt;p&gt;Hello&lt;/p&gt;
</code></pre>
<h3 id="heading-rule">Rule:</h3>
<blockquote>
<p>A tag is just a label<br />An element is a complete structure</p>
</blockquote>
<h2 id="heading-element-as-a-box-concept">Element as a Box Concept</h2>
<p>Think of an element like a box:</p>
<pre><code class="lang-plaintext">-----------------------
| Opening tag         |
| Content             |
| Closing tag         |
-----------------------
</code></pre>
<p>Everything inside this box is <strong>one unit</strong>.</p>
<h1 id="heading-self-closing-void-elements">Self-closing (void) elements</h1>
<p>Not all the element have closing tag. Some of the elements don’t need any closing tag because they don’t wrap any content.<br />The elements which are complete by themself known as <strong>self-closing elements</strong> or <strong>void elements</strong>.</p>
<h3 id="heading-simple-definition">Simple Definition:</h3>
<blockquote>
<p>A self-closing (void) element is an HTML element that does not need a closing tag because it has no content inside it.</p>
</blockquote>
<p>Ex:-</p>
<pre><code class="lang-plaintext">&lt;img src="photo.jpg"&gt;
&lt;br&gt;
&lt;hr&gt;
&lt;input type="text"&gt;
&lt;meta charset="UTF-8"&gt;
&lt;link rel="stylesheet" href="style.css"&gt;
</code></pre>
<h2 id="heading-old-style-vs-modern-style">Old Style vs Modern Style</h2>
<h3 id="heading-old-xhtml-style">Old XHTML style:</h3>
<pre><code class="lang-plaintext">&lt;img src="image.png" /&gt;
</code></pre>
<h3 id="heading-modern-html5-style">Modern HTML5 style:</h3>
<pre><code class="lang-plaintext">&lt;img src="image.png"&gt;
</code></pre>
<p>Both work, but <strong>HTML5 does not require</strong> <code>/</code>.</p>
<h1 id="heading-block-level-vs-inline-elements">Block-level vs inline elements</h1>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769624590750/8aa65782-bffb-4d68-a468-8cf6ad03979e.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-commonly-used-html-tags">Commonly used HTML tags</h1>
<p>HTML has many tags, but you don’t need to learn everything at once.<br />As a beginner, you should focus on the <strong>core tags</strong> that are used in almost every website.</p>
<p>These tags build <strong>structure, content, and basic interaction</strong>.</p>
<h2 id="heading-structure-amp-layout-tags">🧱 Structure &amp; Layout Tags</h2>
<pre><code class="lang-plaintext">&lt;html&gt;     → Root of the page
&lt;head&gt;     → Page info (title, meta, links)
&lt;body&gt;     → Visible content
&lt;div&gt;      → Container / layout block
&lt;section&gt;  → Page section
&lt;header&gt;   → Top section
&lt;footer&gt;   → Bottom section
</code></pre>
<hr />
<h2 id="heading-text-content-tags">📝 Text Content Tags</h2>
<pre><code class="lang-plaintext">&lt;h1&gt; to &lt;h6&gt; → Headings
&lt;p&gt;         → Paragraph
&lt;span&gt;      → Inline text container
&lt;br&gt;        → Line break
&lt;hr&gt;        → Divider line
</code></pre>
<hr />
<h2 id="heading-link-amp-media-tags">🔗 Link &amp; Media Tags</h2>
<pre><code class="lang-plaintext">&lt;a&gt;     → Link
&lt;img&gt;   → Image
</code></pre>
<p>Example:</p>
<pre><code class="lang-plaintext">&lt;a href="#"&gt;Click me&lt;/a&gt;
&lt;img src="photo.jpg"&gt;
</code></pre>
<hr />
<h2 id="heading-form-amp-input-tags">🧾 Form &amp; Input Tags</h2>
<pre><code class="lang-plaintext">&lt;form&gt;     → Form container
&lt;input&gt;    → Input field
&lt;textarea&gt; → Text input area
&lt;button&gt;   → Button
&lt;label&gt;    → Input label
</code></pre>
<hr />
<h2 id="heading-list-tags">🧩 List Tags</h2>
<pre><code class="lang-plaintext">&lt;ul&gt; → Unordered list
&lt;ol&gt; → Ordered list
&lt;li&gt; → List item
</code></pre>
<p>Example:</p>
<pre><code class="lang-plaintext">&lt;ul&gt;
  &lt;li&gt;Apple&lt;/li&gt;
  &lt;li&gt;Banana&lt;/li&gt;
&lt;/ul&gt;
</code></pre>
<hr />
<h2 id="heading-metadata-amp-system-tags">🧠 Metadata &amp; System Tags</h2>
<pre><code class="lang-plaintext">&lt;title&gt; → Page title
&lt;meta&gt;  → Page info
&lt;link&gt;  → External file link
</code></pre>
<p>These are the all you need to learn.</p>
<p><strong>Don’t forget to follow me .</strong><br /><strong>Let’s meet in another blog with another web-dev topic.</strong><br /><strong>Let’s Explore WebDev.</strong></p>
]]></content:encoded></item><item><title><![CDATA[DNS Record Types Explained]]></title><description><![CDATA[When you type a website name in your browser, something interesting happens behind the scenes. To open a website, the browser needs data.Sometimes this…]]></description><link>https://explore-webdev.hashnode.dev/dns-record-types-explained</link><guid isPermaLink="true">https://explore-webdev.hashnode.dev/dns-record-types-explained</guid><category><![CDATA[dns]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[devjourneywithme]]></category><category><![CDATA[Explore Webdev]]></category><dc:creator><![CDATA[Rahul Kumar]]></dc:creator><pubDate>Wed, 28 Jan 2026 10:40:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769508623115/134fc506-ba77-4b49-a8ed-3a5520ead40f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-introduction-to-dns">INTRODUCTION TO DNS</h1>
<h3 id="heading-what-happens-when-you-type-a-website-name-in-a-browser">🌐 What Happens When You Type a Website Name in a Browser?</h3>
<p>When you type a website name in your browser, something interesting happens behind the scenes.</p>
<p>To open a website, the browser needs <strong>data</strong>.<br />Sometimes this data is already available in the <strong>cache</strong>, so the site loads instantly.<br />But other times, the browser must <strong>request the data from a server</strong>.</p>
<p>The problem is — the browser doesn’t know <strong>where the server is</strong> or <strong>which server to talk to</strong>.<br />There are <strong>billions of servers</strong> on the internet, and the browser has no direct way to identify the correct one.</p>
<p>And there’s an even bigger problem:<br />Humans are good at remembering <strong>names</strong>, not <strong>numbers</strong>.</p>
<p>Servers are identified using <strong>IP addresses</strong> (numbers), which can be difficult to remember.<br />That’s why every server IP is <strong>mapped to a domain name</strong>, so instead of remembering numbers, we only remember <strong>names</strong>.</p>
<p>To find the correct IP address for a domain name, the browser relies on <strong>DNS</strong>.</p>
<hr />
<h3 id="heading-what-is-dns">📖 What is DNS?</h3>
<p><strong>DNS (Domain Name System)</strong> maps a <strong>domain name to an IP address</strong>, allowing the browser to locate the correct server.</p>
<p>Simply put:</p>
<blockquote>
<p><strong>DNS is the phonebook of the Internet.</strong></p>
</blockquote>
<p>Want to know more about it? Try this →</p>
<h1 id="heading-dns-records-and-their-need">DNS RECORDS AND THEIR NEED</h1>
<p>DNS record - It is made up of two words, DNS and record. We understand that we are talking about the record. So, what is a record?</p>
<blockquote>
<p>A record = one unit of data that stores specific information.</p>
</blockquote>
<p>A <strong>DNS record</strong> is a piece of information stored in DNS that tells the Internet <strong>how to handle a domain name</strong>.</p>
<p>It tells things like:</p>
<ul>
<li><p>Where the website server is</p>
</li>
<li><p>Where emails should go</p>
</li>
<li><p>Who manages the domain?</p>
</li>
<li><p>Which domain points to which name</p>
</li>
</ul>
<p>If there is no record, who will answer these questions?<br />This is the reason we need a DNS record.</p>
<h1 id="heading-types-of-dns-record">TYPES OF DNS RECORD</h1>
<h2 id="heading-ns-record">NS Record</h2>
<p>NS stands for <strong>Name Server.</strong><br />An NS record tells the Internet :</p>
<blockquote>
<p>Who is responsible for managing the DNS records of a domain?</p>
</blockquote>
<p>For example:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><a target="_blank" href="http://example.com"><strong>example.com</strong></a></td><td><strong>record type:</strong></td><td><strong>value:</strong></td><td><strong>TTL</strong></td></tr>
</thead>
<tbody>
<tr>
<td>@</td><td>NS</td><td>ns1.exampleserver.com</td><td>21600</td></tr>
</tbody>
</table>
</div><p>NS always points to the authoritative server, not an alias. That is why an NS record can never point to a CNAME record.</p>
<h2 id="heading-a-record">A Record</h2>
<p><strong>A</strong> stands for <strong>Address.</strong><br />An <strong>A</strong> record maps a domain name to the <strong>IPv4 address</strong>. You might be thinking what is IPv4?<br />You’re like, we already know what the IP address is. But What is IPv4?</p>
<p>Simple IPv4 is Internet Protocol version 4, this version use 32 bit protocol that assign IP address to your device. But if a website has an IPv6 address, it will instead use an <strong>“AAAA“ record.</strong></p>
<blockquote>
<p>A record = domain → server IP</p>
</blockquote>
<p>To get the IP address in IPv4 format, we use an A record.</p>
<p><strong>EX:-</strong></p>
<blockquote>
<p><a target="_blank" href="http://example.com">example.com</a> A 192.168.1.1</p>
</blockquote>
<h2 id="heading-aaaa-record"><strong>AAAA Record</strong></h2>
<p><strong>AAAA</strong> stands for <strong>Address(IPv6).</strong><br />An <strong>AAAA record</strong> maps a <strong>domain name to an IPv6 address</strong>. Now your question is, what is IPv6?</p>
<p>IPv6 - Internet Protocol version 6, this version use 128 bit protocol that assign IP address to your device.</p>
<p><strong>Ex:-</strong></p>
<blockquote>
<p><a target="_blank" href="http://example.com">example.com</a> AAAA 2001:db8:85a3::8a2e:370:7334</p>
</blockquote>
<h2 id="heading-cname-record"><strong>CNAME Record</strong></h2>
<p><strong>CNAME</strong> stands for <strong>Canonical Name</strong>.</p>
<p>A <strong>CNAME record</strong> maps <strong>one domain name to another domain name</strong>.</p>
<p>In simple words:</p>
<blockquote>
<p><strong>CNAME = name → name (alias system)</strong></p>
</blockquote>
<p><strong>Ex:-</strong></p>
<blockquote>
<p><a target="_blank" href="http://www.example.com">www.example.com</a> CNAME <a target="_blank" href="http://example.com">example.com</a></p>
</blockquote>
<p>A <strong>CNAME record cannot exist with other records</strong> on the same name<br />(No A, MX, NS, TXT on the same domain label). <strong>What does that mean?</strong></p>
<p><strong>Ex:-</strong></p>
<blockquote>
<p><a target="_blank" href="http://example.com">example.com</a> CNAME <a target="_blank" href="http://site.com">site.com</a></p>
<p><a target="_blank" href="http://example.com">example.com</a> A 192.168.1.1</p>
</blockquote>
<p>This is wrong because the same domain is used for an alias and for a real identity.<br />So a valid DNS setup is:-</p>
<p><strong>Pure-alias:-</strong></p>
<blockquote>
<p><a target="_blank" href="http://blog.example.com">blog.example.com</a> CNAME <a target="_blank" href="http://example.com">example.com</a></p>
</blockquote>
<p>or <strong>Real Identity:-</strong></p>
<blockquote>
<p><a target="_blank" href="http://example.com">example.com</a> A 192.168.1.1</p>
<p><a target="_blank" href="http://example.com">example.com</a> MX <a target="_blank" href="http://mail.example.com">mail.example.com</a></p>
</blockquote>
<p>That means a domain name can be <strong>either</strong>:</p>
<ul>
<li><p>a real identity (A, MX, TXT, NS...)</p>
</li>
<li><p><strong>or</strong> an alias (CNAME)</p>
</li>
</ul>
<p>It cannot be both.</p>
<h2 id="heading-mx-record">MX Record</h2>
<p><strong>MX</strong> stands for <strong>Mail Exchange</strong>.</p>
<p>An <strong>MX record</strong> tells the internet:</p>
<blockquote>
<p><strong>Where emails for a domain should be delivered.</strong></p>
</blockquote>
<p>In simple words:</p>
<blockquote>
<p><strong>MX record = domain → mail server</strong></p>
</blockquote>
<p><strong>Ex:-</strong></p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>example.com</strong></td><td><strong>record type:</strong></td><td><strong>priority:</strong></td><td><strong>value:</strong></td><td><strong>TTL</strong></td></tr>
</thead>
<tbody>
<tr>
<td>@</td><td>MX</td><td>10</td><td>mailhost1.example.com</td><td>45000</td></tr>
<tr>
<td>@</td><td>MX</td><td>20</td><td>mailhost2.example.com</td><td>45000</td></tr>
</tbody>
</table>
</div><p>MX records use <strong>priority values</strong> to decide:</p>
<blockquote>
<p><strong>Which mail server should be used first</strong>, and<br /><strong>Which server should act as backup</strong>?</p>
</blockquote>
<h2 id="heading-txt-record">TXT Record</h2>
<p><strong>TXT</strong> stands for <strong>Text</strong>.</p>
<p>A <strong>TXT record</strong> stores <strong>extra text-based information</strong> about a domain.</p>
<p>In simple words:</p>
<blockquote>
<p><strong>TXT record = extra instructions + verification info</strong></p>
</blockquote>
<p>Ex:-</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td><strong>example.com</strong></td><td><strong>record type:</strong></td><td><strong>value:</strong></td><td><strong>TTL</strong></td></tr>
</thead>
<tbody>
<tr>
<td>@</td><td>TXT</td><td>"This is an awesome domain! Definitely not spammy."</td><td>32600</td></tr>
</tbody>
</table>
</div><p>TXT records are used for:</p>
<ul>
<li><p>Domain ownership verification</p>
</li>
<li><p>Google Search Console</p>
</li>
<li><p>SSL verification</p>
</li>
<li><p>Email security (SPF, DKIM, DMARC)</p>
</li>
<li><p>Service authentication</p>
</li>
</ul>
<h1 id="heading-how-all-dns-records-work-together-for-one-website">🧩How all DNS records work together for one website</h1>
<p>A website never uses a <strong>single</strong> DNS record; it uses multiple DNS records. Each record solve there problem solves a different problem.<br />Let’s take one domain as an example:<br /><a target="_blank" href="http://mywebsite.com"><code>mywebsite.com</code></a></p>
<pre><code class="lang-bash">NS    → ns1.cloudflare.com
A     → mywebsite.com → 34.120.10.5
AAAA  → mywebsite.com → IPv6 address
CNAME → www.mywebsite.com → mywebsite.com
MX    → mail.mywebsite.com (priority system)
TXT   → verification + email security
</code></pre>
<p>When a user searches <a target="_blank" href="http://mywebsite.com"><code>mywebsite.com</code></a>, the DNS lookup process begins.</p>
<p>First, DNS uses the <strong>NS record</strong> to find the root server responsible for the <code>.com</code> domain.<br />This tells the system <strong>which DNS server manages the domain</strong>.</p>
<p>Then, to locate the actual server:</p>
<ul>
<li><p>The browser uses the <strong>A record</strong> to get the <strong>IPv4 address</strong> of the server that stores the data of <a target="_blank" href="http://mywebsite.com"><code>mywebsite.com</code></a>.</p>
</li>
<li><p>If the network uses IPv6, the browser uses the <strong>AAAA record</strong> to get the <strong>IPv6 address</strong>.</p>
</li>
</ul>
<p>Now, users may type:</p>
<ul>
<li><p><a target="_blank" href="http://mywebsite.com"><code>mywebsite.com</code></a></p>
</li>
<li><p><a target="_blank" href="http://www.mywebsite.com"><code>www.mywebsite.com</code></a></p>
</li>
</ul>
<p>Both point to the same website because of the <strong>CNAME record</strong>, which maps:</p>
<pre><code class="lang-bash">www.mywebsite.com → mywebsite.com
</code></pre>
<p>So both names load the same server.</p>
<p>If someone sends an email to the domain:</p>
<pre><code class="lang-bash">user@mywebsite.com
</code></pre>
<p>The <strong>MX record</strong> decides:</p>
<blockquote>
<p>Where the email should go<br />Which mail server should receive it<br />How mail routing happens</p>
</blockquote>
<p>For domain verification, service authentication, and email security, the website uses <strong>TXT records</strong>.</p>
]]></content:encoded></item><item><title><![CDATA[How DNS Resolution Works]]></title><description><![CDATA[You searched Google.com many time but have u ever thought about how your device knows which server stores the data of Google.com? There are multiple…]]></description><link>https://explore-webdev.hashnode.dev/how-dns-resolution-works</link><guid isPermaLink="true">https://explore-webdev.hashnode.dev/how-dns-resolution-works</guid><category><![CDATA[Beginner Developers]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[devjourneywithme]]></category><category><![CDATA[Explore Webdev]]></category><dc:creator><![CDATA[Rahul Kumar]]></dc:creator><pubDate>Wed, 28 Jan 2026 10:36:29 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769510392768/8dc7d8c5-5385-40a9-a0c6-f9e598551b56.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1 id="heading-introduction">INTRODUCTION</h1>
<p>You searched Google.com many time but have u ever thought about how your device knows which server stores the data of Google.com? There are multiple servers; how does the device know which one he need to talk to?</p>
<p>Each server have there own IP address. If someone wants to talk to that server he need that IP address. Imagine trying to call someone without knowing their phone number — impossible. You know the name, but the network understands only numbers.</p>
<h2 id="heading-dns-the-internets-phonebook">📒 DNS = The Internet’s Phonebook</h2>
<p>DNS stands for Domain Name System. DNS maps a domain name to the IP address of servers. It is similar to a phonebook, which is why DNS is also called the Internet’s Phonebook.</p>
<p>The process of converting a human-readable name into a machine-readable address is known as name resolution.</p>
<pre><code class="lang-plaintext">google.com  →  142.250.190.14
</code></pre>
<h2 id="heading-why-does-name-resolution-exist">❓Why does name resolution exist?</h2>
<p>To answer this, imagine there is no DNS. Then, <strong>how would you access a website?</strong><br />Typing in the browser <strong>http://142.250.190.14/</strong>.<br />Suppose you remember the IP of <strong>Google</strong>, what about <strong>Gmail</strong>, <strong>Youtube</strong> or <strong>Hashnode</strong>?</p>
<p>There are billions of websites. Are u able to remember all? Forget about all. <strong>Are you able to remember 10</strong>? No, right.</p>
<p><strong>But are u able to remember 10 names?</strong><br />Of course u are able because the human brain is good with remembering names instead of number that is why we want someone who checks into the phone book, we say the name, and the person checks in the phone book and provides the IP of the server.</p>
<h1 id="heading-what-is-the-dig-command-and-when-is-it-used">What is the <code>dig</code> command, and when is it used?</h1>
<p><strong><em>dig</em></strong> stands for <strong>Domain Information Groper.</strong> Wait, <strong>Groper?.</strong> Great catch 😄 — the word <strong>“groper”</strong> sounds weird until you know the history.<br />In <strong><em>dig,</em></strong><br /><strong>Groper</strong> means:</p>
<blockquote>
<p>to search, explore, or probe deeply to find hidden information</p>
</blockquote>
<p>It is a <strong>DNS debugging and inspection tool</strong> used to query DNS servers directly and see how name resolution actually works.</p>
<pre><code class="lang-bash">dig [@server] [domain] [query-type] [options]
</code></pre>
<ul>
<li><p><strong>@server</strong>: This is optional. Use it to specify the DNS server you want to query. If omitted, DIG uses the default server.</p>
</li>
<li><p><strong>domain</strong>: This is the domain name you are querying about.</p>
</li>
<li><p><strong>query-type</strong>: This specifies the type of DNS record you want to query (e.g., A, MX, NS). If not specified, DIG defaults to querying A records.</p>
</li>
<li><p><strong>options</strong>: DIG offers various options to format or filter query results. Here are some common options used with dig:</p>
<ul>
<li><p><em>+short</em>: Gives a shorter, more concise output.</p>
</li>
<li><p><em>+trace</em>: Traces the path of the query across the DNS namespace.</p>
</li>
<li><p><em>+noall +answer</em>: Shows only the answer section of the query.</p>
</li>
</ul>
</li>
</ul>
<p><code>dig</code> is used when you need to manually query DNS servers to inspect, debug, analyse, or understand DNS resolution and DNS records.</p>
<p>In short**, when you want to ask something from DNS, use the dig command.**</p>
<h1 id="heading-understanding-dig-ns-and-root-name-servers">Understanding <code>dig . NS</code> and root name servers</h1>
<p>To understand the <code>dig . NS</code>, you need to understand the DNS hierarchy first.<br />When you search a domain, DNS need to start searching from somewhere, and that somewhere is the<code>.</code></p>
<blockquote>
<p><code>.</code> means the <strong>root of the internet’s DNS system</strong>.</p>
</blockquote>
<p>So when DNS resolve the domain, it must start from<code>.</code> root zone. Even when we search Google.com, it is actually Google.com. The last dot represents the root zone, from where resolution starts.</p>
<pre><code class="lang-plaintext">google.com. 

.        ← Root (top)
|
.com
|
google
|
www
</code></pre>
<p><code>.</code> is a logical concept, but its actual implementation is the root name servers.</p>
<p>A <strong>root name server</strong> is a <a target="_blank" href="https://en.wikipedia.org/wiki/Name_server">name server</a> for the root zone of the <a target="_blank" href="https://en.wikipedia.org/wiki/Domain_Name_System">Domain Name System (DNS)</a> of the Internet. It directly answers requests for records in the root zone and answers other requests by returning a list of the authoritative name servers for the appropriate <a target="_blank" href="https://en.wikipedia.org/wiki/Top-level_domain">top-level domain (TLD)</a>.</p>
<p>Now, <code>NS</code> is the name server that answers one question.</p>
<blockquote>
<p>“Who should I ask about this domain?”</p>
</blockquote>
<p>There are 13 logical root servers, and their implemented copies are 1600+ around the world.</p>
<p>okay we know what NS do but <strong>what is NS?</strong></p>
<blockquote>
<p>An <strong>NS record</strong> tells <strong>which DNS servers are responsible for a domain</strong>.</p>
</blockquote>
<p>Wait, <strong>what is a DNS record?</strong></p>
<blockquote>
<p>A <strong>DNS record</strong> is a stored rule that tells DNS <strong>what to do with a domain name</strong>.</p>
</blockquote>
<pre><code class="lang-bash">dig . NS
</code></pre>
<iframe src="https://app.warp.dev/block/embed/1eqp5ZQqFRTRNpbXcCXVh3" style="width:1272px;height:1328px;border:0;overflow:hidden"></iframe>

<p><code>dig . NS +short</code> +short</p>
<blockquote>
<p><code>+short</code> tells <code>dig</code> to show <strong>only the final answer</strong>, and hide all protocol/debug information.</p>
</blockquote>
<pre><code class="lang-bash">dig . NS +short
</code></pre>
<iframe src="https://app.warp.dev/block/embed/7mZRki340JlRtPqQgmNDIh" style="width:1272px;height:435px;border:0;overflow:hidden"></iframe>

<h1 id="heading-understanding-dig-com-ns-and-tld-name-servers">Understanding <code>dig com NS</code> and TLD name servers.</h1>
<p>When we get the root server and start the <strong>DNS resolution</strong> process, we now need TLD servers.<br />Wait, <strong>what is TLD?</strong></p>
<blockquote>
<p>A <strong>TLD</strong> is the <strong>last part of a domain name</strong>, and it represents the <strong>top category</strong> in the DNS hierarchy.</p>
</blockquote>
<p>Each domain has a category; to represent that category, we need a TLD server. There are multiple categories based on which TLDs have different types:-</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Type</td><td>Meaning</td><td>Examples</td></tr>
</thead>
<tbody>
<tr>
<td>gTLD</td><td>Generic</td><td>.com, .org, .net</td></tr>
<tr>
<td>ccTLD</td><td>Country-based</td><td>.in, .us, .uk</td></tr>
<tr>
<td>sTLD</td><td>Sponsored</td><td>.edu, .gov, .mil</td></tr>
<tr>
<td>nTLD</td><td>New domains</td><td>.ai, .tech, .app</td></tr>
</tbody>
</table>
</div><p>TLD stands for <strong>Top Level Domain.</strong><br />By doing a <code>dig . NS</code>, we get to know from where the DNS resolution start and there are 13 root servers on which the DNS resolution starts. From the global root zone to the TLD server, we need to do a <code>dig com NS</code>. This command tells about the TLD server that handles the .com category.</p>
<pre><code class="lang-bash">dig @8.8.8.8 com NS +short
</code></pre>
<p>We need a public DNS because sometimes the local DNS is unable to resolve the domain.</p>
<iframe src="https://app.warp.dev/block/embed/ADdb8PO5INBnDWpNNyooAa" style="width:1272px;height:435px;border:0;overflow:hidden"></iframe>

<h1 id="heading-understanding-dig-googlecomhttpgooglecom-ns-and-authoritative-name-servers">Understanding <code>dig</code> <a target="_blank" href="http://google.com"><code>google.com</code></a> <code>NS</code> and authoritative name servers</h1>
<p>The TLD server gives the IP address of the authoritative servers and say <strong>“Ask him, he knows where the google.com IP is."</strong></p>
<p>Now we are at the <strong>third layer</strong> of the DNS hierarchy learning — after:</p>
<ul>
<li><p><code>dig . NS</code> → Root layer</p>
</li>
<li><p><code>dig com NS</code> → TLD layer</p>
</li>
</ul>
<p>Now we reach the <strong>domain ownership layer</strong>:<br />👉 <strong>Authoritative Name Servers</strong></p>
<pre><code class="lang-bash">dig @8.8.8.8 google.com NS +short
</code></pre>
<iframe src="https://app.warp.dev/block/embed/twXMAskUkfOKwLLlZHnRWF" style="width:1272px;height:264px;border:0;overflow:hidden"></iframe>

<p>These are the authoritative servers that actually store the DNS record of google.com.</p>
<h1 id="heading-understanding-dig-googlecomhttpgooglecom-and-the-full-dns-resolution-flow">Understanding <code>dig</code> <a target="_blank" href="http://google.com"><code>google.com</code></a> and the full DNS resolution flow</h1>
<p>This is the final step where we get the actual IP address of Google.com. In this last step, we convert the domain into an IP.</p>
<p>You are asking DNS:</p>
<blockquote>
<p>“Give me the IP address of <a target="_blank" href="http://google.com"><code>google.com</code></a>”</p>
</blockquote>
<pre><code class="lang-bash">dig google.com +short
</code></pre>
<iframe src="https://app.warp.dev/block/embed/SAoRcch274mJ1UmHzsIoQM" style="width:1272px;height:207px;border:0;overflow:hidden"></iframe>

<h1 id="heading-conclusion">Conclusion</h1>
<p>To provide a better understanding of the flow of the DNS resolution process, we have some steps to follow to get the IP address.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769593201040/8191b0d5-85a7-4831-a4db-f9510e0cb9fd.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item><item><title><![CDATA[Understanding Network Devices: How the Internet Reaches Your Application]]></title><description><![CDATA[Category: Web Development / Computer NetworksTarget Audience: Beginner to Intermediate Web DevelopersWriting Style: Conceptual + Real-world analogies +…]]></description><link>https://explore-webdev.hashnode.dev/understanding-network-devices-how-the-internet-reaches-your-application</link><guid isPermaLink="true">https://explore-webdev.hashnode.dev/understanding-network-devices-how-the-internet-reaches-your-application</guid><category><![CDATA[devjourneywithme]]></category><category><![CDATA[Explore Webdev]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[networking]]></category><dc:creator><![CDATA[Rahul Kumar]]></dc:creator><pubDate>Thu, 22 Jan 2026 13:31:33 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1769088526836/5de4d6f0-ac7a-4716-84bf-1acfc8666a90.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Category:</strong> Web Development / Computer Networks<br /><strong>Target Audience:</strong> Beginner to Intermediate Web Developers<br /><strong>Writing Style:</strong> Conceptual + Real-world analogies + Architecture-focused</p>
<h1 id="heading-introduction-from-the-internet-to-your-screen">Introduction: From the Internet to Your Screen</h1>
<p>You have heard about the word <strong><em>internet</em></strong>, but have you ever thought about <strong>how it reaches to your application?</strong></p>
<p>When you open an app or website on your device, what do you think actually happens? The message or video data needs to be shared so that it travels from different devices and then arrives at your device.</p>
<p>Today, we learn in this blog <strong>how the internet reaches your devices.</strong> To understand the internet, you first need to know about the concept of a network.</p>
<h3 id="heading-what-is-a-network">🌐What is a network?</h3>
<p>A network is made up of three things that is:-</p>
<pre><code class="lang-plaintext"> computer + wire/wireless connection + rules = Network
</code></pre>
<p>However, as engineers, we give these rules fancy names, known as <strong>protocols</strong>.</p>
<p>This protocol is needed for computers to communicate without any conflict, so that these computer devices know when, how, or where to send data.</p>
<h3 id="heading-then-what-is-the-internet">🌍 Then What Is the Internet?</h3>
<p>Now comes the interesting part. The internet is not a <strong>single network.</strong></p>
<p><strong>It is a group of networks that communicate through a common protocol.</strong></p>
<p>To make such a massive network possible, a large amount of optical fibre cables is placed deep down in oceans so that data can be transferred all over the world and the network can be stabilised.</p>
<p>But the question is not what the internet the question is still how it reaches to your device?</p>
<h1 id="heading-how-the-internet-reaches-to-your-device">How the Internet reaches to your device</h1>
<p>When you type a website URL or open an app, the data does <strong>not come directly from the internet to your device</strong>. Instead, it travels through multiple layers of infrastructure before finally reaching your home.</p>
<p>Let’s understand with each step:-</p>
<h2 id="heading-1-global-internet-backbone">1️⃣ Global Internet Backbone</h2>
<p>First of all, the Internet is not a <strong>wireless technology</strong>; there is a large number of wires established inside the deep ocean which transfer data between countries, continent and large data centres.<br />But wait, <strong><em>why do we need data from another continent?</em></strong></p>
<p>The answer is simple: the transfer of data is between two computers. The one who request for the data we call it as <strong>client</strong>, and the other one who serves the data is known as the <strong>server.</strong></p>
<p>Now these servers can be anywhere in the world, which is why we need to connect the world by wire. But wait, what type of wires is it? Is it copper wire?</p>
<p>No, because the wires are underwater, we need a strong, durable, and fast data transfer cable for this purpose. For this, a special type of cable is used, known as a <strong>Fibre-Optic cable</strong>.</p>
<p>You don’t need to go into depth of Fibre-optic cable, just for knowledge, you should know that the speed of cable is terabit/sec for data transfer.</p>
<p>So till now you get the data from a different country to your country, but how does it reach your device? For this, we need to go for second step</p>
<h2 id="heading-2-internet-service-providers-isp">2️⃣ Internet Service Providers (ISP)</h2>
<p>Your device is not directly connected to the global backbone cables. Instead of this, it is connected to the ISP. But you might think, what is the ISP?</p>
<p>ISP full form is Internet Service Providers, as the name suggest It provide the internet services ISP take the bandwidth from the backbone and then provide internet services to local or regional networks.</p>
<p>But you might be thinking, why do I need an ISP? Why don’t I connect my device to the backbone?</p>
<p>The answer is simple these backbone infrastructure is costly, and to make such costly infrastructure for each device is not worth it, so that is why we need an ISP. Also, if we connect each device to the backbone, the infrastructure will be complex.</p>
<p>Now, you might be thinking, who are those ISPs, and how do they transfer data?</p>
<p>You already know the ISP names. In India, there are many famous names, such as Airtel, Jio, VI etc. Now, you know who the ISPs but one question left is how they transfer data?</p>
<h3 id="heading-how-an-isp-distributes-the-internet-working-of-an-isp">🌐 How an ISP Distributes the Internet (Working of an ISP)</h3>
<p>ISP act as a large-scale network distributor. Its have one job that to take massive internet bandwidth from the backbone and then distribute it to the home and offices.</p>
<h4 id="heading-1-internet-backbone-isp-core-network"><strong>1️⃣ Internet Backbone → ISP Core Network</strong></h4>
<p>When the internet travels through the cables and reaches to the ISP core network, it terminates at the ISP core routers. These routers handle high throughput, Inter-ISP routing <strong>(BGP)</strong> and security.<br />Wait, <strong>what is BGP?</strong></p>
<p>BGP stands for Border Gateway Protocol. It is responsible for deciding the best route for your data transmission. Do you want to know more? Refer to this page, <a target="_blank" href="https://www.cloudflare.com/en-in/learning/security/glossary/what-is-bgp/">BGP</a>.</p>
<h4 id="heading-2-isp-core-routers-the-central-brain"><strong>2️⃣ ISP Core Routers – The Central Brain 🧠</strong></h4>
<p>ISP core routers transfer data from the internet backbone to your home by deciding the best possible path. But you don’t need to learn more about it, just think more like a traffic police officer.</p>
<p>This core router is connected via fibre to regional routers, data centre routers and peer routers.</p>
<h4 id="heading-3-regional-distribution-network-splitting-by-city"><strong>3️⃣ Regional Distribution Network – Splitting by City</strong></h4>
<p>Now the internet is transmitted to the regional router and then distributed to the Area/aggregation router. It is similar to the state warehouse sending goods to the local area warehouse.</p>
<p>These regional splits traffic by state, city, and zones. It reduces the workload and is easy to manage in high-traffic situations.</p>
<h4 id="heading-4-area-aggregation-router-neighbourhood-level"><strong>4️⃣ Area / Aggregation Router: Neighbourhood Level</strong></h4>
<p>These routers connect Street cabinets, Fibre splitters, and Building-level switches. As the name suggest this is used for aggregation purpose multiple cables and lines get aggregated here and transmitted to the home through a fibre splitter.</p>
<h2 id="heading-3-the-last-mile-connection"><strong>3️⃣ The Last-Mile Connection</strong></h2>
<p>This is the final step of getting internet. It is directly connected to the device. In this step, The Fibre splitter cables get connected to the modem, which further transmits to the router.</p>
<p>But wait, you might be thinking, <strong>what is a modem, and why do we need that?</strong></p>
<p>Before we go further, first we should understand the definition of a modem and a use case.</p>
<h3 id="heading-modem-the-translator">🔌 Modem – <em>The Translator</em></h3>
<p>I can give the detailed definition of a modem, but actually, we don’t need it. But for the knowledge purpose</p>
<p>A modem, which is made by two words, Modulator-Demodulator. These words are self-explanatory, but still I will explain it in simple term modem is a device that converts digital signals to analog signal and vice versa, because computers understand digital signal but our electrical signal is analog that is why we need a modem.</p>
<p>Now let’s get back to the fibre cable, but wait, data is transmitted to the router. Yeah, so the router distributed the data to the device that requested it.</p>
<p>Now we are using the word router, but we never discuss about that. Let’s discuss about it.</p>
<h3 id="heading-router-the-traffic-police"><strong>📡 Router – <em>The Traffic Police</em></strong></h3>
<p>A router is a device that works as a traffic police; it is responsible for the security and the path that the data will travel. It is used everywhere, but the core difference is its capacity to transmit.</p>
<p>And now this router transmits your data to your devices, and that is how the internet reaches to your devices.</p>
<h1 id="heading-devices-used-in-internet-transmission">🌐 Devices Used in Internet Transmission</h1>
<p>I already explained two devices to you, one is a modem, and the other is a router. Both have different name different uses, but still people get confused. To remove such confusion, I explained each device that is used to transfer the internet.</p>
<h2 id="heading-modem">Modem</h2>
<p>A modem is a device used to convert an ISP’s electrical signals to a digital signal so that devices understand the signals.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769020927434/66b04c27-e0b8-4695-b47f-28fd1926cf92.png" alt class="image--center mx-auto" /></p>
<p>It works like a translator between the ISP and the router. Do you want more detail check this out<br /><a target="_blank" href="https://www.geeksforgeeks.org/computer-networks/what-is-modem/">What is a modem?</a></p>
<h2 id="heading-router">Router</h2>
<p>A router is a device that decides where your data should go, as its name suggest it is for deciding the best routes for the data packets. It creates your local network, assigns private IP addresses, routes packets to the correct devices and sperate private network from the public Internet.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769023432696/3ca14e2b-6e25-40ab-beb1-a127c4a3b957.png" alt class="image--center mx-auto" /></p>
<p>A router works like a traffic police officer who reads vehicle number plates, checks the destination, sends vehicles onto the correct road, and ensures returning vehicles reach the right house. Want to know more about the router? <a target="_blank" href="https://www.geeksforgeeks.org/computer-networks/introduction-of-a-router/">Introduction to the router</a>.</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Factor</td><td>Modem</td><td>Router</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Main Job</strong></td><td>Connects to ISP</td><td>Manages network traffic</td></tr>
<tr>
<td><strong>Function</strong></td><td>Signal translation</td><td>Packet routing</td></tr>
<tr>
<td><strong>Network Creation</strong></td><td>❌ No</td><td>✅ Yes</td></tr>
<tr>
<td><strong>Device Handling</strong></td><td>❌ No</td><td>✅ Yes</td></tr>
<tr>
<td><strong>Internet Access</strong></td><td>Entry point</td><td>Distribution point</td></tr>
</tbody>
</table>
</div><h2 id="heading-switch-vs-hub">Switch V/S Hub</h2>
<p>In the starting everything started when we wanted to transfer data from one computer to another. For this, we created a network, but to create a local network for a very small range, known as a LAN (Local Area Network), we introduced a hub.</p>
<p>A hub is a device that is responsible for transferring data from one device to another. It is working on the wire, and it receives data on one port and broadcasts it to all. Every device receives the data, only the intended device accepts it, and others discard it.</p>
<p>It works like a loudspeaker in the office; everyone hears the message, even if it’s not for them.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769025974976/13985801-65f5-4781-b059-8c8874d3a3ba.png" alt class="image--center mx-auto" /></p>
<p>Hub is good, but the problem is unnecessary data transmission, due to this, several issues are created, like network collision, wasted bandwidth, security risk, and it is very slow.</p>
<p>To overcome these problem we have a better version of hubs known as switches.</p>
<p>A switch is a device that transfers data to one who requested it. Unlike a hub, it doesn’t transfer data to all the devices, which solves the problem of security, wasted bandwidth and network collision.</p>
<p>The switch device learns which device is connected to which port, and by looking at that port address, it transfers data to the intended one.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769027861008/20089f8b-3aa0-486f-97cd-0e6d73b45b3f.png" alt class="image--center mx-auto" /></p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Factor</td><td>Hub</td><td>Switch</td></tr>
</thead>
<tbody>
<tr>
<td><strong>Main Job</strong></td><td>Broadcast data</td><td>Direct data</td></tr>
<tr>
<td><strong>Delivery</strong></td><td>To all devices</td><td>To the target device</td></tr>
<tr>
<td><strong>Intelligence</strong></td><td>None</td><td>Smart (MAC-based)</td></tr>
<tr>
<td><strong>Speed</strong></td><td>Slow</td><td>Fast</td></tr>
<tr>
<td><strong>Security</strong></td><td>Poor</td><td>Good</td></tr>
</tbody>
</table>
</div><h2 id="heading-firewall">Firewall</h2>
<p>A firewall is a device that provides security to the network. It allows the traffic that has access to enter or leave a network. Think of it like a security guard of the office who has the id they can enter in the office; others will not.</p>
<p>A firewall has multiple functions:-</p>
<p><strong>Traffic filtering:-</strong> It allows safe Traffic and blocks the unsafe ones based on the rules IP, Port, Protocol and direction.</p>
<p><strong>Access Control:-</strong> It decides who can access what, from where and by which protocols.</p>
<p><strong>Threat Prevention:-</strong> It blocks suspicious traffic, detects scanning attempts, and prevents unauthorised access.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769079355847/04341a04-95e7-4212-a3ff-340af109c27d.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-load-balancer"><strong>Load Balancer</strong></h2>
<p>Load balancers are the devices used to manage the traffic of requests so that no single server gets overloaded and crashes. Suppose what would happen if all the cars were to use a single road? There would be a situation of jam. To avoid this problem, we use multiple lanes, and these lanes are another server in our case.</p>
<p>This device makes sure that all the servers get equal traffic, no single server gets overloaded and crashes. The core functionality of the load balancers is the distribution of traffic equally to all the servers. It provides high availability and scalability. But wait, how does it do that?</p>
<p>Due to the multiple servers, even if one server fails load balancer switches the traffic to other servers, hence its availability is nearly 99.99%. On the other hand, if there is a large no of users requesting to serve the traffic is automatically transmitted to other server so that is how it provides scalability.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769083814484/54b86baf-30b5-476d-8789-cf5f7fe20e95.png" alt class="image--center mx-auto" /></p>
<p>The working of a load balancer is simple: it will take the request, find the best server and give the request to that server.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769083965199/9e0f4fd5-f688-4df6-bfda-1beca80f63dd.png" alt class="image--center mx-auto" /></p>
<h1 id="heading-the-internet-as-a-post-office-system">📮 The Internet as a Post Office System</h1>
<p>Global internet backbone takes it as a ✈️ <strong>International air mail routes</strong> connecting countries. Now the mail is at our airport, and it is handled by ISP, which you can think of as the <strong>national post office system</strong>. Then the ISP transfers mail to the Local ISP Network (<strong>City post office</strong>). This office collects your mail and transfers it to the local postal branches. Now the Fiber splitter cables transfer your mail as a postman. Now, because it is the International mail we need to translate it that translator is our modem and after translation it sent to the house but because the house is big several floors is where router the owner of the house will send the mail to correct floor now each floor have different rooms so each floor is manage by a gurdian that gardian knows all the family member so they give it to the right person. The gurdian is our switch, and the person is the device, and the mail is the data. Here you can see I call the guardian not a warden because if it is a warden, he will announce the letter and everyone in the house can hear it. There is a person who checks the letter’s purpose, whether it is dangerous or not, that is our firewall.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1769086810047/2778571e-a8fb-494e-9126-c7a050c3a129.png" alt class="image--center mx-auto" /></p>
]]></content:encoded></item><item><title><![CDATA[Inside Git: How It Works and the Role of the .git Folder]]></title><description><![CDATA[If you use Git daily but still feel unsure about what actually happens behind commands like git add and git commit, you are not alone. Most developers…]]></description><link>https://explore-webdev.hashnode.dev/inside-git-how-it-works-and-the-role-of-the-git-folder</link><guid isPermaLink="true">https://explore-webdev.hashnode.dev/inside-git-how-it-works-and-the-role-of-the-git-folder</guid><category><![CDATA[devjourneywithme]]></category><category><![CDATA[Git]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[version control]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[Explore Webdev]]></category><dc:creator><![CDATA[Rahul Kumar]]></dc:creator><pubDate>Sat, 17 Jan 2026 13:48:58 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1768657449902/2232037d-df6c-4c6d-bb7e-b19ef593b1c7.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>If you use Git daily but still feel unsure about what actually happens behind commands like <code>git add</code> and <code>git commit</code>, you are not alone.</p>
<p>Most developers learn Git by memorising commands. But Git becomes truly powerful when you understand <strong>how it works internally</strong>.<br />In this article, we will open Git’s black box and understand the real role of the <code>.git</code> folder, how Git stores data, and how it tracks changes.</p>
<p>This blog focuses on <strong>building a mental model of Git</strong>, not just learning commands.</p>
<hr />
<h2 id="heading-what-is-git-internally">What Is Git, Internally?</h2>
<p>At its core, Git is <strong>not a tool that tracks files</strong>.<br />Git is a <strong>content-addressable database</strong> that stores snapshots of your project.</p>
<p>Instead of asking:</p>
<ul>
<li><p>“What line changed?”</p>
</li>
<li><p>“What was deleted?”</p>
</li>
</ul>
<p>Git asks:</p>
<ul>
<li>“What does the project look like <em>now</em>?”</li>
</ul>
<p>Each snapshot is stored permanently and identified using a cryptographic hash.</p>
<hr />
<h2 id="heading-why-the-git-folder-exists">Why the <code>.git</code> Folder Exists</h2>
<p>When you run:</p>
<pre><code class="lang-bash">git init
</code></pre>
<p>Git creates a hidden folder named <code>.git</code>.</p>
<p>This folder <strong>is the repository</strong>.</p>
<p>Your project files are just a working copy.<br />The entire history, branches, commits, and metadata live inside <code>.git</code>.</p>
<p>If you delete the <code>.git</code> folder:</p>
<ul>
<li><p>Git history is gone</p>
</li>
<li><p>branches disappear</p>
</li>
<li><p>commits no longer exist</p>
</li>
</ul>
<p>The <code>.git</code> folder exists so Git can:</p>
<ul>
<li><p>store history</p>
</li>
<li><p>track versions</p>
</li>
<li><p>ensure data integrity</p>
</li>
</ul>
<hr />
<h2 id="heading-structure-of-the-git-directory">Structure of the <code>.git</code> Directory</h2>
<p><img src="https://humbletoolsmith.com/img/posts/a-look-inside-the-_git-folder/Git%20Folder%20Internals.png" alt="Image" /></p>
<p>Important parts of the <code>.git</code> folder:</p>
<ul>
<li><p><strong>objects/</strong><br />  Stores all Git data (files, folders, commits)</p>
</li>
<li><p><strong>refs/</strong><br />  Stores pointers to branches and tags</p>
</li>
<li><p><strong>HEAD</strong><br />  Points to the current branch</p>
</li>
<li><p><strong>index</strong><br />  Represents the staging area</p>
</li>
<li><p><strong>config</strong><br />  Repository-specific configuration</p>
</li>
</ul>
<p>The most important directory is <code>objects/</code>.<br />Everything Git knows is stored there.</p>
<hr />
<h2 id="heading-git-objects-blob-tree-commit">Git Objects: Blob, Tree, Commit</h2>
<p>Git stores data using objects. There are only a few types, and three are essential.</p>
<p><img src="https://aboullaite.me/content/images/2017/06/git-objects.png" alt="Image" /></p>
<p><img src="https://thoughtbot-images.s3.amazonaws.com/upcase/git-course/git-base-object-model.png" alt="Image" /></p>
<h3 id="heading-blob-file-content">Blob (File Content)</h3>
<p>A blob stores:</p>
<ul>
<li><p>file content only</p>
</li>
<li><p>no filename</p>
</li>
<li><p>no folder structure</p>
</li>
</ul>
<p>If two files have the same content, Git stores only one blob.</p>
<hr />
<h3 id="heading-tree-directory-structure">Tree (Directory Structure)</h3>
<p>A tree represents a directory.</p>
<p>It stores:</p>
<ul>
<li><p>filenames</p>
</li>
<li><p>references to blobs</p>
</li>
<li><p>references to other trees</p>
</li>
</ul>
<p>Trees connect blobs into a folder hierarchy.</p>
<hr />
<h3 id="heading-commit-snapshot">Commit (Snapshot)</h3>
<p>A commit stores:</p>
<ul>
<li><p>a reference to one tree</p>
</li>
<li><p>author information</p>
</li>
<li><p>timestamp</p>
</li>
<li><p>commit message</p>
</li>
<li><p>parent commit reference</p>
</li>
</ul>
<p>A commit does <strong>not</strong> store files directly.</p>
<p><strong>Commit → Tree → Blob</strong></p>
<hr />
<h2 id="heading-how-git-tracks-changes">How Git Tracks Changes</h2>
<p>Git does not store differences between files.</p>
<p>Instead, Git stores:</p>
<ul>
<li><p>complete snapshots</p>
</li>
<li><p>reused objects for unchanged content</p>
</li>
</ul>
<p>If a file does not change:</p>
<ul>
<li><p>Git reuses the same blob</p>
</li>
<li><p>no extra storage is used</p>
</li>
</ul>
<p>This design makes Git fast, efficient, and reliable.</p>
<hr />
<h2 id="heading-what-happens-during-git-add">What Happens During <code>git add</code></h2>
<p><img src="https://phoenixnap.com/kb/wp-content/uploads/2021/09/git-workflow.png" alt="Image" /></p>
<p><img src="https://git-scm.com/book/en/v2/images/areas.png" alt="Image" /></p>
<p>When you run <code>git add</code>:</p>
<ol>
<li><p>Git reads the file from the working directory</p>
</li>
<li><p>Creates a blob object from its content</p>
</li>
<li><p>Stores it in <code>.git/objects</code></p>
</li>
<li><p>Updates the index (staging area)</p>
</li>
</ol>
<p>Important point:<br /><code>git add</code> does <strong>not</strong> create a commit.<br />It prepares the snapshot.</p>
<hr />
<h2 id="heading-what-happens-during-git-commit">What Happens During <code>git commit</code></h2>
<p><img src="https://miro.medium.com/v2/1%2Al3ajqm6cHXkRpTVUlkiXSw.gif" alt="Image" /></p>
<p><img src="https://git-scm.com/book/en/v2/images/data-model-3.png" alt="Image" /></p>
<p>When you run <code>git commit</code>:</p>
<ol>
<li><p>Git reads the staging area</p>
</li>
<li><p>Creates a tree object</p>
</li>
<li><p>Creates a commit object</p>
</li>
<li><p>Updates the current branch reference</p>
</li>
<li><p>Moves HEAD forward</p>
</li>
</ol>
<p>Now the snapshot is permanent.</p>
<hr />
<h2 id="heading-how-git-uses-hashes-for-integrity">How Git Uses Hashes for Integrity</h2>
<p>Every Git object is identified using a SHA-1 hash.</p>
<p>The hash depends on:</p>
<ul>
<li><p>object type</p>
</li>
<li><p>object size</p>
</li>
<li><p>object content</p>
</li>
</ul>
<p>If anything changes:</p>
<ul>
<li><p>the hash changes</p>
</li>
<li><p>integrity is broken</p>
</li>
</ul>
<p>This makes Git:</p>
<ul>
<li><p>tamper-proof</p>
</li>
<li><p>reliable</p>
</li>
<li><p>secure by design</p>
</li>
</ul>
<p>Git trusts content, not filenames.</p>
<hr />
<h2 id="heading-the-mental-model-you-should-remember">The Mental Model You Should Remember</h2>
<p>Think of Git as:</p>
<p>Working Directory → Staging Area → Repository</p>
<p>Internally:</p>
<p>Commit<br />→ Tree<br />→ Blobs</p>
<p>Once this clicks, concepts like:</p>
<ul>
<li><p>branching</p>
</li>
<li><p>merging</p>
</li>
<li><p>rebasing</p>
</li>
<li><p>detached HEAD</p>
</li>
</ul>
<p>start making sense naturally.</p>
<hr />
<h2 id="heading-final-thoughts">Final Thoughts</h2>
<p>Git is not magic.<br />It is a carefully designed system built on:</p>
<ul>
<li><p>immutable objects</p>
</li>
<li><p>snapshots</p>
</li>
<li><p>cryptographic hashes</p>
</li>
</ul>
<p>The <code>.git</code> folder is the heart of Git.<br />Understanding it transforms Git from something you <em>use</em> into something you <em>understand</em>.</p>
<hr />
]]></content:encoded></item><item><title><![CDATA[Why Version Control Exists: The Pendrive Problem]]></title><description><![CDATA[In earlier days, technology was not as advanced as it is today, and developers often struggled to work together on the same codebase. Collaborating on a…]]></description><link>https://explore-webdev.hashnode.dev/why-version-control-exists-the-pendrive-problem</link><guid isPermaLink="true">https://explore-webdev.hashnode.dev/why-version-control-exists-the-pendrive-problem</guid><category><![CDATA[version control]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[Git]]></category><category><![CDATA[ChaiCode]]></category><category><![CDATA[software development]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[Rahul Kumar]]></dc:creator><pubDate>Thu, 08 Jan 2026 06:46:01 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1767853089269/3db1d64b-9d08-4e99-b4e3-ab3cc67b9e30.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">Introduction</h2>
<blockquote>
<p>In earlier days, technology was not as advanced as it is today, and developers often struggled to work together on the same codebase. Collaborating on a single file was difficult, and managing changes manually consumed a lot of time.</p>
<p>To solve these problems, distributed version control systems were introduced. They help track every change made to the code and allow multiple developers to work on the same project without worrying about breaking the final version.</p>
</blockquote>
<h2 id="heading-the-pendrive-analogy-in-software-development">The Pendrive Analogy in Software Development</h2>
<p>Before modern collaboration tools existed, developers often shared code using pendrives, emails, or zipped folders. This approach worked for very small projects but quickly became problematic as collaboration increased.</p>
<p>Imagine you are working on a product and need help implementing an AI feature or backend logic. Since you are not an expert in that domain, you zip your entire codebase and share it with another developer using a pendrive or email. The other developer makes changes, fixes some issues, and sends the updated code back to you.</p>
<p>When you open the received code, you notice that the project works, but you have no idea what changes were made. You then continue developing new features on your local copy. Later, the other developer discovers a bug in the earlier version of the code and fixes it on their system. However, your codebase has already moved forward, and now both versions are different.</p>
<p>At this point, both developers are forced to wait for each other. There is no clear way to track changes, no single source of truth, and no guarantee which version is the final one. This situation often leads to folders named <code>final</code>, <code>final_v2</code>, <code>latest_final</code>, or <code>final_really_latest</code>, creating confusion instead of clarity.</p>
<p>This entire situation is commonly referred to as the <strong>pendrive problem</strong>. It highlights the challenges of manual code sharing, where changes are lost, bugs are reintroduced, and collaboration becomes slow and unreliable. These problems led to the creation of distributed version control systems, which track every change and allow multiple developers to work on the same codebase simultaneously without waiting for each other.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767853947619/5c63078c-17ef-4ec7-b3f2-50b682204670.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-problems-faced-before-version-control-systems">Problems Faced Before Version Control Systems</h2>
<p>Before version control systems existed, developers faced several challenges while working on shared codebases:</p>
<ul>
<li><p><strong>Unable to track changes:</strong> Developers had no clear way to know what changes were made, when they were made, or who made them.</p>
</li>
<li><p><strong>No simultaneous development:</strong> Only one person could work on the code at a time, forcing others to wait and slowing down progress.</p>
</li>
<li><p><strong>No single source of truth:</strong> There was no main or authoritative copy of the codebase, leading to confusion about which version was correct.</p>
</li>
<li><p><strong>High inconsistency in code:</strong> Manual copying and merging of files often introduced bugs and unstable behaviour.</p>
</li>
<li><p><strong>Overwriting of code:</strong> Changes made by one developer could easily overwrite another developer’s work.</p>
</li>
<li><p><strong>No change history:</strong> If a bug was introduced, there was no way to go back to a previous stable version.</p>
</li>
<li><p><strong>Difficult bug tracking:</strong> Identifying when and where a bug was introduced was extremely hard.</p>
</li>
<li><p><strong>Poor collaboration:</strong> Team coordination depended on manual communication instead of tools.</p>
</li>
<li><p><strong>High risk of data loss:</strong> If a pen drive, email, or local system failed, the code could be lost permanently.</p>
</li>
</ul>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767854248565/b9a57e7f-daf9-47b5-8a56-da5bb32ccaab.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-why-version-control-became-mandatory-in-modern-development">Why Version Control Became Mandatory in Modern Development</h2>
<p>As software projects became more complex, multiple team members were required to work on the same codebase. Managing changes manually was no longer practical, especially when everyone was contributing simultaneously.</p>
<p>To ensure smooth collaboration, developers needed a way to track changes, avoid conflicts, and maintain a single source of truth. This is why tools like Git became essential, as they keep a complete history of all changes. Platforms like GitHub further simplified collaboration by providing a central place where developers can share code and work together efficiently.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>In the end, version control systems solve the core problems of tracking changes and enabling collaboration on a shared codebase. They allow multiple developers to work on the same project simultaneously while maintaining a complete and reliable history of changes. In today’s world, where software projects are large, complex, and built by many teams, version control has become a mandatory part of modern software development.</p>
]]></content:encoded></item><item><title><![CDATA[Git for Beginners: Basics and Essential Commands]]></title><description><![CDATA[Learn Git basics, core concepts, and essential commands with a beginner-friendly workflow guide.]]></description><link>https://explore-webdev.hashnode.dev/git-for-beginners-basics-and-essential-commands</link><guid isPermaLink="true">https://explore-webdev.hashnode.dev/git-for-beginners-basics-and-essential-commands</guid><category><![CDATA[Git]]></category><category><![CDATA[GitHub]]></category><category><![CDATA[version control]]></category><category><![CDATA[Web Development]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[ChaiCode]]></category><dc:creator><![CDATA[Rahul Kumar]]></dc:creator><pubDate>Wed, 07 Jan 2026 13:49:11 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1767792013132/623d639d-2f21-4bfd-8cca-c12915a2c52b.avif" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2 id="heading-introduction">INTRODUCTION</h2>
<p>When we start our journey in web development, we often believe that we can build an entire product on our own. However, as we gain experience, we realise that building real-world applications requires knowledge from multiple domains such as backend, AI, cybersecurity, and more.</p>
<p>To solve complex problems, we often take help from other developers and share our code with them. However, sharing code manually can quickly become a mess.</p>
<p>Imagine sharing code using a pendrive. One person fixes a bug, another adds new features, and soon no one knows what exactly changed, where the bug was fixed, or which version of the code is the correct one. Collaboration becomes slow, confusing, and risky.</p>
<p>This is where a distributed version control system comes into play. It helps track every change made by every developer and allows multiple people to work on the same project safely. Git is such a system, and GitHub is a platform that helps host and manage Git repositories.</p>
<h2 id="heading-what-is-git">What is Git?</h2>
<p>Git is a distributed version control system that helps track every change made to a codebase and allows multiple developers to work on the same project safely.</p>
<h2 id="heading-why-git-is-used">Why Git is Used</h2>
<p>Git is used because it solves two major problems:</p>
<ul>
<li><p>It tracks every change made to a codebase, preventing the project from becoming messy or inconsistent.</p>
</li>
<li><p>It allows multiple developers to work on the same project simultaneously without overwriting each other’s work.</p>
</li>
</ul>
<h2 id="heading-git-basics-and-core-terminologies">Git Basics and Core Terminologies</h2>
<p>Before understanding Git, we need to learn some basic and core terminologies.</p>
<h3 id="heading-repository">Repository</h3>
<p>A repository is a folder that contains your project’s code and its complete change history. Git tracks all files inside this folder.</p>
<h3 id="heading-commit">Commit</h3>
<p>A <strong>commit</strong> is a snapshot of the project that saves all the changes added to the staging area into the repository.</p>
<h3 id="heading-branch">Branch</h3>
<p>A <strong>branch</strong> is a separate line of development that allows developers to work on changes independently without affecting the main codebase.</p>
<h3 id="heading-head">Head</h3>
<p><strong>HEAD</strong> is a pointer that refers to the current commit in the repository. It tells Git where you are currently working in the project’s history.</p>
<h2 id="heading-git-workflow-working-directory-staging-area-repository">Git Workflow (Working Directory → Staging Area → Repository)</h2>
<p>The Git workflow consists of three main stages:</p>
<ul>
<li><p><strong>Working Directory:</strong> This is the directory where you create, edit, and modify files.</p>
</li>
<li><p><strong>Staging Area:</strong> This is an intermediate area where you select and prepare changes before committing them.</p>
</li>
<li><p><strong>Repository:</strong> This is where Git permanently stores committed changes along with the complete history of the project.</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767791561133/07be14b8-009f-49db-9dac-affb4e88c727.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
<h2 id="heading-common-git-commands">Common Git Commands</h2>
<h3 id="heading-git-init">git init</h3>
<p>This command initializes a new Git repository inside the current working directory.</p>
<pre><code class="lang-bash">git init
</code></pre>
<h3 id="heading-git-status">git status</h3>
<p>This command shows the current status of the working directory, including which files are tracked, untracked, or staged by Git.</p>
<pre><code class="lang-bash">git status
</code></pre>
<h3 id="heading-git-add">git add</h3>
<p>This command adds new or modified files from the working directory to the staging area, preparing them for a commit.</p>
<ul>
<li><p><strong>git add .</strong><br />  This stages <strong>all new and modified files</strong> in the current directory and its subdirectories.</p>
<pre><code class="lang-bash">  git add .
</code></pre>
</li>
<li><p><strong>git add</strong><br />  This stages <strong>only a specific file</strong>, giving more control over what changes are included in the commit.</p>
<pre><code class="lang-bash">  git add index.html
</code></pre>
</li>
</ul>
<h3 id="heading-git-commit">git commit</h3>
<p>This command saves the changes that are already added to the staging area into the repository as a new commit.</p>
<pre><code class="lang-bash">git commit -m <span class="hljs-string">"Commit message"</span>
</code></pre>
<h3 id="heading-git-log">git log</h3>
<p>This command displays the commit history of the repository, showing details such as commit messages, authors, and timestamps.</p>
<pre><code class="lang-bash">git <span class="hljs-built_in">log</span>
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1767791654477/d002a7f1-f081-4bda-a574-d1b9eceea81a.avif" alt class="image--center mx-auto" /></p>
<h2 id="heading-basic-developer-workflow-using-git">Basic Developer Workflow Using Git</h2>
<p>A basic Git workflow for a beginner looks like this:</p>
<ol>
<li><p>Create a new project folder and start working on your files in the working directory.</p>
</li>
<li><p>Initialize Git inside the project using <code>git init</code>.</p>
</li>
<li><p>Create new files or modify existing files in the project.</p>
</li>
<li><p>Add the changes to the staging area using <code>git add .</code>.</p>
</li>
<li><p>Save the staged changes into the repository using <code>git commit -m "Commit message"</code>.</p>
</li>
<li><p>Repeat the process whenever you make new changes.</p>
<p> <img src="https://humbletoolsmith.com/img/posts/a-look-inside-the-_git-folder/Git%20Folder%20Internals.png" alt="A Look Inside the .git Folder" /></p>
<h2 id="heading-conclusion">Conclusion</h2>
<p> Git is an essential tool for every developer as it helps manage code changes and enables smooth collaboration between multiple developers. Learning Git from the beginning builds good development habits and prevents common mistakes while working on real-world projects. Beginners should practice Git regularly on small projects to gain confidence and improve their workflow.</p>
</li>
</ol>
]]></content:encoded></item></channel></rss>