Check out a free preview of the full Full Stack for Front-End Engineers, v3 course

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

Jem discusses some restrictions when purchasing domain names, demonstrates how to purchase a domain name through Namecheap, and how to connect that domain to the previously created droplet on Digital Ocean.

Preview
Close

Transcript from the "Buying a Domain Name" Lesson

[00:00:00]
>> Yes, Mark.
>> With the domain name, are there other things offered like SSL, hosting, etc, or do I need to get it? Or are there any add-ons or things?
>> So we're gonna use Namecheap for our domains, we're gonna use Namecheap even though the UI is just okay.

[00:00:24]
We're using them cuz they have a lot of functionality built in. So if you want SSL, you want email hosting, you can do all that via Namecheap, they don't try to push you too hard. Originally, I tried to use the Google Domains, cuz I'm like, Google, things like google.domains, or domains.google, I forget which one.

[00:00:43]
So I went through, I bought a domain with them, one, it was more expensive than Namecheap. Two, they really were trying to upsell me the whole way, which I really don't like. You already know my stance on ads and privacy, I have a strong stance on being upsold on things as well.

[00:00:57]
So we use Namecheap because it's gonna give you the cheapest domain name possible. There might be something like or something like that which maybe a little cheaper. But Namecheap's gotta have the biggest selection at the cheapest prices. And there's another question about country level top domains, who owns them?

[00:01:15]
Generally, something like, .ru comes to mind. Russia owns the .ru domain name, they've registered that with ICANN. Most countries own their own domain names, that's not always the case. Because the country can sell away the rights to their domain for money. I've tried think of some examples from the earlier days of the Internet, but there's like some country, .io.

[00:01:40]
You all remember a couple years ago the explosion of, every startup and tech company had .io company name or .ly company name? It was bit.ly and fast.ly and all these other things. Yeah, that was a trend that went away, I don't know what happened to that. But the .ly domain name is actually a country TLD owned by somebody, some small island nation.

[00:02:06]
I think they sold it, or they made a bunch of money from that, .ly, just because it happened to rhyme, or go well with the English language. So countries generally own them, not necessarily. The other one is, there are reserved domain names that you cannot get. So .org, the only way to get a .org is to be a registered organization.

[00:02:23]
So generally, maybe a nonprofit or something like that. I can't just say like gem.org, I have to actually be a 501(3)(c) nonprofit or something like that. The other one is .edu, you have to be a legitimate educational institute to have a .edu domain name. Another one comes to mind is .gov, you can't get a .gov domain name, that kinda makes sense.

[00:02:46]
Only legitimate government entities can do that, .mil, .military, you can only get if you're part of the military. So there are restricted domain names that you may see that aren't available besides the ones that are owned by corporations. But don't get distracted, once we go to Namecheap, you will see how many possible TLDs there are.

[00:03:05]
And you probably won't be able to think of funny names for all of them. So I'm gonna jump to namecheap.com. And what sort of domain name do I have? I really should plan this ahead of time. I put 100 plus hours in this course, and I didn't bother thinking of a funny domain name.

[00:03:35]
I'm stuck here.
>> If it helps, I'm gonna register quake3lanparty.lol.
>> [LAUGH]
>> Because that brings me back to my college days.
>> So someone's gonna register quake3lanparty.lol, that's pretty good.
>> Someone registered at Google to the sql2google.com.
>> [LAUGH]
>> [LAUGH] All right, jemstack.lol, I wish I bought fullstack.

[00:04:03]
All right, you do not need any services, SSL, we're gonna do that ourselves and we're gonna do it for free. So you don't need any of this stuff. Business email, I will show you how to set up email forwarding, just nice to have with domain, it's pretty sweet.

[00:04:23]
All right, so I'm gonna check out, I already have an account with Namecheap and my cart, so I'm just gonna check out. Blah, domain privacy, sure, confirm my order. We see here with the registration, remember we talked about ICANN? We pay them a fee every time we buy a domain or renew it, it helps keep the nameservers alive, helps keep it running.

[00:04:52]
I'm just gonna buy it. Important thing on Namecheap or any other registrar, so Namecheap is known as the registrar at Google Domains. Any sort of domain hosting are known as registrar's because they register your domain to yourself as the owner. You always want a strong password, you always want two-factor authentication.

[00:05:13]
There have been times in the past where people have stolen people's credentials. And suddenly, microsoft.com goes somewhere else entirely different. And imagine the chaos there, because it's very easy to clone a webpage and make it look legit. And then make a login page, and then you're just stealing everybody's logins really easily.

[00:05:35]
Hence, you always want security around your domain to be very limited to a subset of people and very, very, very tight. Okay, so I have secretly put in my credit card information, everybody in the room knows my credit card. Seeing some unusual purchase activity already, but that's okay, we'll just recharge it later.

[00:05:55]
So I've bought a domain name, I bought jemstack.lol, which, following the rules of a domain name, it needs to be funny or memorable, preferably both. So now we're into the domain management screen. So if you need to get to here in Namecheap, you just go to your domains list here, you can see all the domains that I own, I told you.

[00:06:16]
I should have just kept one of these, like netflix.college, it cost me $70 a year to maintain this. And I don't do anything with it, I just bought it cuz I was like, someday I'll do something with it, netflix.design, why do I own these? Really dashboard, anyways, we won't go into the issues with domain squatting and things like that.

[00:06:34]
So we're gonna go to jemstock.lol, and I'm gonna to Manage. Okay. All right, so you've probably gotten this far before, most engineers I know own some sort of domain. But now it's the part where we actually hook it up to something. This is the missing link for a lot of people, I know it was initially for me.

[00:07:01]
So let's check out what the slides have to say for our next steps. So we're gonna buy a domain with a registrar. Again, you don't have to use Namecheap, they just happen to have the cheapest domain names for educational purposes or for fun. Then we're gonna update the nameserver, remember we said who the nameservers were?

[00:07:21]
That giant kinda phone book mapping names to IP addresses? So we're gonna move those name servers over to DigitalOcean, which will make it a little bit easier to manage. We can leave it with Namecheap, it doesn't really matter. But for this exercise, let's just switch over to DigitalOcean cuz I want you to have that experience of moving your nameserver.

[00:07:41]
And then once we update our nameserver, we're going to go in DigitalOcean instead of Namecheap and we're gonna add two A records. And remember what we said A records where? They map domains to IPs. So we're gonna add one for the @, the @ is just your domain name.

[00:07:57]
So in this case, mine would be jemstack.lol, that's the @, it always represents the root. Dub dub dub, www, it's not considered a subdomain, but it's generally the convention, World Wide Web. Not a phrase we use a lot these days, but it exists by convention. So I want jemstack.lol to work on both jemstack.lol and www.gemstack.lol, depending on how you navigate it.

[00:08:22]
So let's go ahead, and first thing we're gonna do, we're gonna update our nameservers. So click on your droplet, then click on the three dots and say Add a domain. So we can do this first, we can do it after, it doesn't really matter, let's do the nameservers first.

[00:08:43]
So the nameservers are just ns1.digitalocean.com, ns2.digitalocean.com, ns3.digitalocean.com, and they're somewhere in here. I usually have them listed out, I forget where, but I'll find it in a second, but they're pretty easy to remember. So back in Namecheap, under our Domain Management page, we're gonna go all the way down to nameservers.

[00:09:11]
And we're gonna say Custom DNS, and the name server for DigitalOcean, ns1.digitalocean.com. And I'm gonna copy paste cuz I don't wanna type in the wrong thing. And we wanna add all three, so ns2, ns3. And all this is saying is Namecheap is a registrar, they say, hey, I own jemstack.lol.

[00:09:52]
It's registered to me personally, my address, I'm the one in charge of renewing it, things like that. However, I'm gonna move my actual DNS management over to Digital Ocean, using their nameservers. That means Digital Ocean will be the authoritative answer as far as where the domain actually goes.

[00:10:12]
So I'm gonna say Save, it may take a second to propagate some of these changes. Because again, there's a whole bunch of registrars and nameservers. It can take anywhere up to a couple minutes for the changes to propagate across the Internet. And I didn't do it because I moved my redirect email, but I'll show you on a different domain how to have some fun.

[00:10:40]
So I'll pick gogemgo.com, again, a great domain name, but I haven't done anything with it, I also moved that to Digital Ocean. Let me pick a random one that I know, let's see, I'll pick netflix.college. I really just need to drop these, I don't know why I'm paying for these.

[00:10:59]
I'm sure everybody says that every year. So on Namecheap, a cool thing you can do is you can make an alias for all of your email addresses. So if I wanna make, I don't know, jem@jemstack.lol, I can do that, so I can put a wildcard here. Put a catch-all, actually, and I can just forward it to myself at one of my email addresses, @gmail.com So now I can send any traffic, I can't write emails using this because it's just a forward.

[00:11:50]
But what I like to do, and this is one of my favorite things to do, is if I'm using a product or service, I say, for instance, like my personal domain name, jemyoung.com, I just say I'm on amazon@jemyoung.com. That way I know if I ever get spams where all these things are coming from, and I can wildcard it all.

[00:12:11]
If I wanna sign up for Frontend Masters, I can say frontendmasters@gemyoung.com. And I have all these custom email addresses that just forward to my personal one. Now, you can't send email addresses with a forwarder, that you have to pay for, which is possible, it's not too expensive. And that way you can have your own private domain, your own private email, it makes you look professional when you own yourself@yourself.com or something like that.

[00:12:33]
But if you just want to do forwarding, it's free, and it's a pretty fun way of catching spam or just making life a little bit more interesting. I will say this, people are not as technology adept, they sometimes get suspicious. I use one, it was like mybank@jemyoung.com, like, do you work for this bank?

[00:12:54]
And I'm ending the bank, so don't call my bank, but I was like, no, that's just a forwarding address, they're like, okay. And they really gave me, is this a hacker, man? So be careful, that's actually happened to me a few times. If I use the company name at mydomainname.com, they get really suspicious.

[00:13:14]
Then I have to explain email forwarding and that's the whole thing, but it's worth it to have a custom domain name. Okay, so now that those changes have hopefully propagated out on the Internet, we can add domain names to Digital Ocean now. So I'm gonna say gemstack.lol. And we're gonna add that domain, and we're gonna map it to my droplet here.

[00:13:41]
Remember, I only had one droplet, if you made more than one, make sure you pick the right one. So we're gonna add that domain here, and of course, we can't just add it, we need to add a record. So remember we said the @ was the root? So that's just gemstack.lol, and we're gonna pick, is this the right one?

[00:14:03]
See, this way you don't have too many droplets. That's the right one, is it the right one? Let me double check. Scroll up to my actual IP address cuz I'm lazy, yes, it ends in 128.44, okay, so this is the right one. So we're gonna create an A record, and then we'll create another one for www, and we're gonna map it to our droplet again.

[00:14:32]
And then we're gonna create another record. Okay, everybody there with me? One small step for you, one giant leap for your web application. And at this point, if you've done everything right, we have connected our random domain to our random server using the power of Internet, DNS, and nameservers.

[00:15:00]
But if I go to jemstack.lol, nothing, cuz our server doesn't do anything yet. So it doesn't know how to respond to any requests to that query. But using our network tools, let us validate, let's see what the nameservers have done, maybe they haven't propagated fully yet. So we'll say dig jemstack.lol, And it's not available yet, again, these changes can take time.

[00:15:39]
So in the meantime, if it still hasn't happened for some reason, because vagaries of the Internet, we can always just use our IP address for now instead of our domain name. Let me try nslookup, I don't know if that will tell me something different. Yeah, so the changes haven't propagated fully yet, it can take time, yes.

[00:16:04]
>> What service do you use to send emails from your domain?
>> I think Namecheap, depending on who you're using to manage your nameserver, you can just buy a service, Namecheap will have it. I forget how much it costs, I know Google, you can do with Google as well, if you wanna hand them control of your domain.

[00:16:24]
So what will happen if you wanna do Gmail forwarding, or have a Gmail address with your domain. You have to hand, not control, but you need to move the nameserver over to Google Domains, just like we did with DigitalOcean. Then that way they can manage the DNS system, and then you can do email forwarding.

[00:16:40]
I think DigitalOcean will allow it too, that's usually a service you have to pay for. If you just want to do email forwarding, that's free, you can do that for free. But if you wanna send that email back out, that costs money. And here there's a button to buy a private email for your domain name if you need.

[00:16:58]
And if you need to transfer it to a different registrar, you would go to Sharing & Transfer. They usually make this pretty difficult, because, obviously, I don't want someone buying randomly netflix.com because they felt like it, yeah.
>> I think Namecheap does, with the private email at least, back with one of my other domains, they do integrate with Google Workspace, or it used to be Google Apps for Business.

[00:17:25]
But if you want that Gmail feel and Google Drive and everything, you just click a couple buttons and they configure the DNS in Namecheap. And they'll bill you for the Google account through your Namecheap account.
>> Nice, did not know that. So for those who couldn't hear, Namecheap will hook up your domain to Google Drive and Gmail if you need, and they'll hook it all for you.

[00:17:51]
I do like Namecheap, the UI may be a bit much, it's a little clunky, maybe more information than you need for most cases, but they are the cheapest and they're pretty reliable. I've used them for well over a decade now and haven't had any issues.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now