CODEX

Web Dev Bytes — Dynamite DNS & Domains

What does it mean to buy a domain? It’s time to learn about DNS!

Evan Martinez
CodeX
Published in
4 min readJan 15, 2021

--

When I was getting started in tech, by far the biggest obstacle I faced was that I didn’t have any foundational knowledge in how the internet works. These articles are my way of giving back, to any aspiring web developers or knowledge seekers looking to broaden their horizons.

Sometimes when I have a cool idea, I’ll head over to GoDaddy or Google Domains and buy a domain name for it. I strive for names that will stick in people’s heads so they can get to my website easily, like letsunite.app or partymoosegames.com (these sites are still unfinished). These days, anybody can buy a domain of their own, but what does it mean to buy a domain? What are you getting, and how in the heck does it work? The key is the Domain Name System, or DNS. Although Domain Name System sounds really technical, it’s actually a really simple concept.

Hello, Operator?

Let’s start with a problem of the internet: talking to other computers. In a previous Web Dev Bytes, we talked about how every single computer on the internet has a unique address called an IP address. In order for you to communicate, your computer needs to know the IP address of the computer it’s trying to reach. But when you want to go to Netflix, you’re not going to remember that its address is 54.165.153.56, nor should you want to! It’s so much easier to simply type in the domain name netflix.com.

Well, that’s where DNS comes in! A DNS is like a giant translator that knows which IP address corresponds to which domain name. So when you type netflix.com, your browser actually first sends a request to a DNS to find out what the Netflix IP address is. Then your browser uses the IP address to actually connect to Netflix. Finally, your browser might store that IP address for future use, so that we don’t need to query the DNS every single time we visit Netflix throughout the day.

The DNS Lair

So there’s a DNS out there that the browser queries, but where is it? The truth is that since a DNS is so simple, anybody can run one! It just needs to be capable of translating a name to an IP address. Of course there are some companies who have created DNS’s that are reliable and fast, and so those are the ones that most people use. For example, Google runs a DNS at 8.8.8.8, so you can configure your computer to use that as its DNS.

Because there are so many Domain Name Systems out there, a problem arises where it takes time to synchronize new entries. Synchronizing DNS’s around the world can take a long time! There’s a cool effect here though: If my computer is configured to use Google’s DNS and yours uses Cloudflare’s DNS, then it’s possible that Cloudflare’s DNS will update first. That means that for a brief period of time your web browser can access a new website before I can!

All the Way to the Top

Now that we understand how DNS works, it’s a little clearer what it means to buy a domain. Part of buying partymoosegames.com is putting an entry in the DNS so that anybody who navigates there will be sent to the computer with your website. But there’s a little bit more that goes on behind the scenes.

There’s this non-profit organization called the Internet Corporation for Assigned Names and Numbers, or ICANN. ICANN is in charge of everything having to do with DNS and assigning IP addresses. But that’s a ton of work, so ICANN has contracts with other companies to ease the load. Those other companies essentially take responsibility for Top-Level Domains, like .com, .net, and .org. For example, VeriSign is a company in charge of ALL the IP addresses and domains for .com websites (in fact, they have a lot of others, including .net and .name).

So now VeriSign is in charge of everything ending in .com. But the internet is MASSIVE, and handling all requests for all the changing domain names and IP addresses in all the different languages would simply be too much. So what VeriSign does is allow sites like GoDaddy, called registrars, to handle the paperwork.

Photo by Cytonn Photography on Unsplash

You can think of it like a wholesaler versus a retailer. VeriSign is the wholesaler, and you can technically do your domain business directly with them. GoDaddy and Google Domains are the retailers that make it much easier, at a higher price. In reality, the registrars are all working from the same stock! If I buy a domain from Google, that means nobody else can buy that domain from any other registrar! The only real differences between registrars are ease of use and pricing.

We Made It!

Woo, that was a big byte! We covered a lot, from DNS to registrars. So the next time you buy a domain for your next big idea, you’ll know what’s going on:

  • The registrar buys the domain from VeriSign (or another top-level domain company),
  • VeriSign updates a DNS,
  • The DNS update propagates around the world, making your website available to the entire internet!

I hope it was easy enough to follow, let me know your thoughts in the comments!

--

--

Evan Martinez
CodeX
Writer for

Hey I'm Evan. I'm a software engineer who loves coding, games, and coding games! I hope to write more about philosophy and coding.