612 words
3 minutes

DNS for IT Girls - How the Internet Works Like Magic

By · Developer Advocate · Docker Captain · IBM Champion
DNS for IT Girls - How the Internet Works Like Magic

Hey, tech queens! 👩‍💻💖

Today, we’re diving into DNS—the secret behind why you can just type google.com instead of some long, impossible-to-remember number. DNS makes the internet easy and user-friendly, and once you understand it, you’ll feel like a total networking goddess! 👑💡


What is DNS?#

DNS (Domain Name System) is like the translator of the internet. It turns human-friendly domain names (web.yourcompany.net) into machine-readable IP addresses.

Think of it like your phone contacts: instead of memorizing phone numbers, you just tap on a name. DNS does the same, but for websites.

Without DNS, you’d have to type 10.0.0.25 instead of facebook.com. Not cute, right? 😅


The Hosts File: The Old-School Hack#

Before DNS, people manually assigned names to IPs using the /etc/hosts file (yeah, ancient times! 😂). But guess what? You can still use this trick today to override DNS settings on your machine!

Pro Tip: Manually Map Names to IPs#

Let’s say you have a database server with IP 10.0.0.5, and you want to access it using the name database. Just add this line to your /etc/hosts file:

Terminal window
10.0.0.5 database

Now, whenever you type ping database, your system will automatically connect to 10.0.0.5, no matter what DNS says! #HackTheNetwork 😏💻


Enter the DNS Server!#

Managing hostnames manually gets messy real quick, so that’s where DNS servers come in! They centralize everything, so instead of keeping a giant hosts file, your system just asks a DNS server for the right IP.

For example, if your company’s internal DNS server is at 10.10.10.1, your laptop will query it whenever it needs to resolve a hostname. If the server doesn’t know the answer, it forwards the request up the chain until it finds the right IP.

Pro Tip: Set a Custom DNS Server#

To manually tell your system where to look for DNS resolutions, update the /etc/resolv.conf file like this:

Terminal window
nameserver 10.10.10.1

Now, all DNS requests will go to 10.10.10.1 first. 🎯


Subdomains: The DNS Name Tree#

Ever wondered why we have maps.yourcompany.net, mail.yourcompany.net, and drive.yourcompany.net? These are subdomains, and they help organize different services inside a company or website. 🌍✨

Example DNS setup for a company:

  • web.yourcompany.net → Main website
  • db.yourcompany.net → Database server
  • mail.yourcompany.net → Email services

DNS ensures that when users type these names, they are sent to the correct servers. It’s basically the road sign system of the internet! 🚦


DNS Caching: How the Internet Gets Faster#

Every time you visit a website, your system caches (stores) the DNS result so it doesn’t have to ask again. This speeds things up 🚄 but can sometimes cause problems when IPs change.

How to Clear Your DNS Cache#

If a website stops loading properly, refreshing the DNS cache might help:

🖥️ On Windows:

Terminal window
ipconfig /flushdns

💻 On Mac/Linux:

Terminal window
sudo systemd-resolve --flush-caches

Now your system will request fresh DNS info instead of using old data. 🔥


Public vs Private DNS: Who Controls the Internet?#

If your DNS server doesn’t know an answer, it forwards the request to public DNS servers like:

Google DNS8.8.8.8
Cloudflare DNS1.1.1.1
OpenDNS208.67.222.222

But for internal company networks, private DNS servers keep things secure. For example, if you work at yourcompany.net, you don’t want random strangers resolving your internal servers! 🚨


Recap: DNS is the GPS of the Internet!#

Now you know that DNS is the backbone of the web—it translates names into IPs, manages subdomains, caches results for speed, and allows you to override settings when needed.

Quick Cheat Sheet:#

/etc/hosts → Manually map names to IPs
/etc/resolv.conf → Set your preferred DNS server
ping, nslookup, dig → DNS troubleshooting tools
ipconfig /flushdns → Clear DNS cache (Windows)
systemd-resolve —flush-caches → Clear DNS cache (Linux/Mac)

You’re officially a DNS queen now! 👑💻 Have you ever played around with your DNS settings? Let’s chat in the comments! 💬✨


Tatiana Mikhaleva

Docker Captain  ·  IBM Champion  ·  AWS Community Builder

DevOps.Pink — cloud-native education for the agentic-AI era.

Related Posts

Same category
  1. 1
    AI SRE Joined My On-Call — A Beginner-Friendly Walkthrough of Rootly
    DevOps & Cloud · What an AI SRE actually does on call. A hands-on walkthrough of Rootly — how it observes, advises, and (when you let it) acts. With a real look at the four-level trust model.
  2. 2
    Stop Lying About Your Backups — Zero-Trust Recovery with Plakar
    DevOps & Cloud · Learn how to master Terraform tags for cloud resource management, automation, and cost tracking. Discover best practices, default tags, and merging strategies!
  3. 3
    Escaping the Command Line Cartel: Why I Mandate Visual Git in Enterprise DX
    DevOps & Cloud · Relying purely on the terminal is a toxic DX dependency. Discover how architecting visual version control with GitKraken eliminates cognitive load, enforces psychological safety, and scales enterprise DevOps.
  4. 4
    Kubernetes Is No Longer Number One — The REAL 2025 Cloud Native Report (CNCF x SlashData)
    DevOps & Cloud · Kubernetes is no longer number one. The 2025 CNCF x SlashData report reveals the real cloud-native trends — backend growth, DevOps adoption, AI gaps, and the technologies developers actually use.

Random Posts

Random
  1. 1
    Inside Helm - How Charts, Releases, and State Work in Kubernetes
    DevOps & Cloud · Learn how Helm really works under the hood — charts, releases, and Kubernetes state management explained in plain DevOps language.
  2. 2
    DevSecOps Explained - Security for DevOps in 2025
    DevOps & Cloud · A no-fluff DevSecOps guide for DevOps engineers. Learn how to build secure pipelines, protect secrets, and integrate security from day one.
  3. 3
    Linux for Beginners - Essential Commands Every IT Girl Must Know
    DevOps & Cloud · Master Linux commands & boost your IT skills! Learn essential commands for navigating, managing files & running processes like a pro.
  4. 4
    Kubernetes on Your Laptop — No Cloud, No Boring Docs, Just Magic
    DevOps & Cloud · Kubernetes tutorial for beginners. Learn to run a full local cluster with Docker, Minikube, YAML, Pods, Deployments, Secrets — no cloud needed.
DNS for IT Girls - How the Internet Works Like Magic
https://devops.pink/dns-for-it-girls-how-the-internet-works-like-magic/
Author
Tatiana Mikhaleva
Published
2025-03-15
License
CC BY-NC-SA 4.0