Transcript from the "Buying a Domain Name" Lesson
>> Jem Young: All right, we've got our server, and what can we do with a server?
>> Jem Young: It's a trick question, we can do whatever we want. This is our computer, we can make it respond to requests that we want. We can make it respond to pings, we can make it not respond to pings.
[00:00:17] Over the next couple hours more instance, tomorrow we'll do some more advanced things. But for today, we're gonna set up a server, we're gonna switch user we're gonna make that user have permissions to do everything that we wanted to do within guidelines. But like I said, we're in route now you can tell by the hash sign and the same thing I can clear it out, so I want to I wanna say who am I?
>> Jem Young: It's a real question I asked myself any day when I look in the mirror I say, who am I, really? But I'm root and we don't wanna be root, we wanna be someone else, I wanna be Jim, you wanna be you. You wanna be something other than you root, in fact you almost never wanna do things as root because it's to the fact that when someone says your hackers computer cool person.
[00:01:10] No people come up to me like I've got root and that means that they have full access to your server. In fact, its own broken and had access is just regular me. There's probably they could do some stuff they can cause some trouble but not as much. But if they have root, they can do lots and lots of bad things.
[00:01:26] But before we do that, I wanna buy a domain, all right, and the domain you want it's totally optional. You don't have to buy a domain, and you probably want one cuz we're gonna set up a subdomain we're gonna do lots of other things like that. But you don't actually need to, you can use an IP address for everything, but I wanted to buy a domain because it's the final step in setting up a real application, a real website for a company.
[00:01:50] I use namecheap.com, you can use anything you want, we're not gonna do too much with the actual domain provider itself. But I use Namecheap because that where all my domains are hosted. That's I know their layout, their UI is a bit dated, in my opinion, sorry Namecheap. But buy domain you can use Google, you can use Go Daddy, you can use whatever you want.
[00:02:13] Buy something cheap because it is your test domain, or buy a real domain cuz you're setting up a real server, it's wholey up to you. I'm gonna buy the funniest domain name I could think of, and we'll see if he can beat me. So I'm gonna use Namecheap, there's no referral link or anything like that, you can use Google or any hosts you want.
[00:02:30] I recommend .party cuz it's a cheap domain and it's funny but you do you, so if you bought a, lot of people will sit on domains they bought a years ago for some side project that they never got around to. And it's not my job to make you feel guilty about that, you're a busy person, you don't have time to explore these domains.
[00:02:49] But, just so you might have had one sitting around, feel like myself, I have like 20 domains that were just sitting there. Well, I can tell you, last class I brought jem.party, which is pretty funny but that was the last class, I wanna mix it up. So I bought jem is the best, jemisthe.best, yes, that's a real domain.
[00:03:08] I tried to buy party.monster, but it's like $20,000 party.monster. Anyways, hopefully you pick something memorable and easy to type and nothing too long cuz you will be typing it quite a bit, if not, it's okay. You can just use the IP address for now like we said earlier, domain name is just to help you remember that because you're not given your IP address.
[00:03:28] But earlier we talked about how domains get results via the name servers, but the results because the name servers keep records, and they're called DNS records. And there's different types of DNS records depending on what you wanna do. Most records are called A records, and they map a name to an IP address.
[00:03:49] For instance, jemoung.com maps to 23.whatever dot, that works, see, I don't remember my own IP address, I've had it for like seven years, so I don't remember. The other record you wanna know about is the CNAME, and that just maps an A or an a canonical name to a different name versus an IP address.
[00:04:09] For example, jemyoug.com is a A record, so it maps jemyoug.com to 18.104.22.168 versus blog.jemyoug.com, that is a CNAME record. Because it maps the sub domain to an IP address, it actually maps it to jemyoug.com and then that maps it to 23.23. And the way we can do this, we can check on the records that a given domain has is we use the dig command.
[00:04:37] So let's go and try that out, you can use it on your server or not. I'm gonna exit my server cuz I don't like doing things with root, you just never know. So I'm gonna exit and run dig, and I'll say run dig on jemyoung.com, we'll see what kinda records we have.
>> Jem Young: Anything interesting? Yeah, so right now we just have one, we have an A record, which we talked about earlier and that's this IP address. And you can run dig on most domains and it's just gonna dig up what sort of records it has who holds records, essentially like who owns this phone book that maps this to this.
[00:05:15] But if I say dig, I'll say blog.jemyoung.com, which is a sub domain,
>> Jem Young: It gives me a 2. It gives me a CNAME, which redirects jemyoung.com, and then it gives me the A record which maps to the actual IP. So we see the CNAME, just maps to a different domain, and then internally that maps to an A record.
[00:05:36] I know you're like, why should I care? Well you care because we're about to set it up right now, and I want you to know what you're doing, and I'm not just self telling you things. But again that was dig, so you can say man dig, it has the utility, pretty straightforward.
[00:05:53] Its good if you wanna know who has information about our website things like that.