This course has been updated! We now recommend you take the Full Stack for Front-End Engineers, v3 course.

Check out a free preview of the full Full Stack for Front-End Engineers, v2 course:
The "Domain Name System" Lesson is part of the full, Full Stack for Front-End Engineers, v2 course featured in this preview video. Here's what you'd learn in this lesson:

Jem explains the DNS domain name registration system and how domain names make the internet more accessible through nameservers. Subdomains are also discussed.

Get Unlimited Access Now

Transcript from the "Domain Name System" Lesson

[00:00:00]
>> Jem Young: But I pinged twitter.com, and I didn't ping an IP address. And the way that works is another set of protocols, there's a lot of protocols. When you look at the Internet and the people that run the Internet and there are people that run the Internet or run the switches and connections and backbones.

[00:00:17] Again, it's this trust system and one of those things is the DNS system. DNS is run by I wanna say it's ICANN Internet, I forgot what ICANN stands for. It stands for something, don't worry, but they control domain names. When you buy domain name, you actually pay a little bit of fee $0.60 or maybe more maybe less to ICANN and they help create this domain name system.

[00:00:40] And what it is is just, it's an Internet phone book. But that's oversimplifying it. It's actually an intelligent Internet phone book, just says hey, I want to go to twitter.com. It's not necessarily routing you directly to the servers in San Francisco because that would be really slow. There's things called data centers all around the world, which is documented in a second.

[00:01:00] But DNS says, what's the closest server that this resolves to? So all it does is it maps domain names to IP addresses. And we need them because I can't remember my own IP address, I can't remember anybody's IP address, I can barely remember my own phone number. The DNS system, you've probably heard of it because again, this is how the Internet works.

[00:01:19] This is how it became accessible. We're not all using shells and using telnet and all these command line tools to download web pages, we're using GUIs. Domain name system is just a way of making the Internet accessible for more people. And you probably all see or not you probably, I guarantee you've seen domains and domain is something like frontendmasters.com, jemyoung.com, that's called your domain.

[00:01:44] The dot com, dot biz, dot net, dot anything, that's the top level domain, it's the TLD. TLDs are owned by specific companies, entities or countries. You know what my least favorite TLD is? Dot biz. You know, dot b-i-z. It just seems like if I see something dot biz, no offense to anybody with a dot biz TLD, it just seems like a scam.

[00:02:08] If it's dot biz, it's like wow. There's an [INAUDIBLE] that wants to give money instead of dot biz. Wow, no, I'm kidding. I'm really not, don't use dot biz. And over the years, if you haven't noticed, all the good dot coms are taken, which is not necessarily true.

[00:02:27] You just have to get really, really creative. Remember that phase a couple of years ago with the dot lys? It was like bitly, fastly, that was like the hot new thing, like the dot li. I want to say dot lyzone by some country somewhere. I don't remember, you can look it up.

[00:02:43] There's dot io, which is really expensive. I wanna say it's Micronesia that owns that country, but almost every country has their own top level domain. So you can say, again, dmx.ru, dmx is the Google of Russia, dot ru is Russia, cn is China. But largely dot com is still kind of the domain that really wants to have because it's the OG domains, the first one, or one of the originals.

[00:03:07] There's also.dot net, there's dot org, but generally dot orgs, it used to be you couldn't get one without being like a nonprofit status or something like that, or university. But they since added dot edu, which a lot of your colleges or universities, things like that have a dot edu.

[00:03:22] But now there's a whole bunch of top level domains, because companies are like well, how come I can't have my own TLD and I CANNs like, okay, we'll make some new ones for you. So now there's dot Google there's dot dev, there's dot party, my favorite domain name.

[00:03:38] Just lots of top level domains, so the good thing is if you need a website today and you don't have one. You're gonna have one by the end of the day but also you could use whatever TLD you want except for dot biz, I'm telling you don't use dot biz, this is a bad idea.

[00:03:51] A subdomain would be the blog or tests or dev dot something. That's what's known as a sub domain. And that just means it still routes to the main domain, but it's just probably a different part of the site. Now, can anybody tell me why I would use a sub domain versus a path?

[00:04:07] And a path would be genuine com slash about or about who am I or something like that. Yes, Sam.
>> Speaker 2: If you want to have more than one actual separate server.
>> Jem Young: Yeah, exactly, right.
>> Speaker 2: It allows you to partition your data more effectively prevents cross site scripting, stuff like that.

[00:04:26]
>> Jem Young: Yeah, you're thinking at a really good level. For users, the subdomain, it just indicates, it's a different site generally. So blog.jemyoung.com looks completely different from jemyoung.com. And I'm not pimping my own website, it's pretty poor, I don't maintain it, I think it's running. I don't even know if it's running half the time because you know.

[00:04:45]
>> Speaker 3: It's running but your last post was five years ago.
>> Jem Young: Yeah, don't judge me.
>> [INAUDIBLE]
>> Jem Young: Don't judge me.
>> Speaker 3: [LAUGH]
>> Jem Young: I thought this was a judgment free zone. I thought hey, I'm going to become internet famous and start doing a blog. And then I ran out of steam really fast of off that, I don't remember my last post is on probably hashing or something like that so important.

[00:05:02] But it just tells the user that you're at a completely different part of the site, and its affiliated with the site, but it's probably a different application entirely. First the path, blog.jemyoung.com slash about, which is yeah, you're part of the site and you're just on a different route, a different page on the main site.

[00:05:22] And because of DNS system, I can map jemyoung.com, the 23.23.185.61. So rather than remember that every single time, I can just type that in and the DNS resolvers figure that out. How do they figure that out? More servers. There are a lot of servers. The Internet is built on servers and trusts and nodes and things like that.

[00:05:43] But there's idea called a name server. And the name server is the actual entity that keeps that mapping. So whenever you buy a new domain from our web host, so name sheep or Go Daddy or Google and one of the big ones. They all have name servers. And that just says hey, this person just bought this domain.

[00:06:00] And it's probably not going anywhere. But if you need to look it up, I know exactly where that is. And actually, I'll talk about that a second with packets. But names are the thing that we probably don't know exist. We're going to modify one today just because we're going to use it to point from our hosts to our server at some point.

[00:06:17] But it's good to know that name servers exists. They essentially Are they the record keepers of the internet if you're trying to type them domain name