How to use DigitalOcean DNS [Video]

DigitalOcean DNS - DigitalOcean Domain tutorial

Video Transcript (Digitalocean DNS Tutorial):

Introduction

Hi there, and welcome to another video! In this video, I want to look at DigitalOcean DNS or DigitalOcean domain.

Requirements

So first things first, what are the things you’re going to need to make this work?

Setting Up Your Domain Registrar

First, of course, you need your domain registrar, because this is where we’re going to change the name server for our domain to let DigitalOcean know that now it’s in charge of the DNS for that domain. I will also use this control panel for demonstrations. Here, I’ll just add a website to see that the website is actually being redirected properly. If you’re using any control panel, you can follow the same procedures to ensure that your domain or your website is working appropriately.

Ensuring Proper DNS Setup for WordPress Installation

If you want to install WordPress on a particular control panel, you have to ensure that your DNS records are working properly, especially if you’re the one who is in charge of setting up the control panel and the domain that I’m going to use. This is the same domain that I used in the Hetzner DNS tutorial, so I’m just going to go and do the same thing for DigitalOcean. If you want to follow along with me, go to your domain registrar and do what I do.

So let’s come back to DigitalOcean. If you want to go to the domains section or the DNS section for DigitalOcean, just come here under ‘Manage,’ and then under ‘Networking,’ you’ll see the option for domains, which is there. Right now, I don’t have any domains here, but of course, I’m going to add one. I’m just going to enter the domain name, paste, and choose for which project this domain belongs. You can see the domain has an error, and I can already guess that’s because there are spaces at the end and at the beginning. Make sure your domain doesn’t have any whitespace when you enter it there, and then I’m going to add the domain.

Updating Name Server Records

You need to update your name server records to tell DigitalOcean that they’re in charge of managing the DNS for that domain. If you scroll down here, you’re going to see the DNS records that you need to add on your registrar’s platform. I’m just going to copy them, and then I will come back to my registrar. I will click on name servers. So whichever registrar you’re using, just find out where you can change the name servers. These are the name servers that I added for the Hetzner DNS tutorial, so I’m going to change them to match DigitalOcean’s name servers. Paste, and here you’re going to have to remove the decimal; otherwise, you’re going to get an error. It depends on your domain registrar. So I’m going to update the name servers. The name servers have been added successfully.

Waiting for DNS Propagation

The next thing is for you to wait, and usually, this will take some time. That’s all you have to do on your registrar: just add the name servers and wait. But that’s not a problem. I’m going to show you the way around to ensure that your DNS records are working properly. Now, the next thing, of course, you need to have records for your DNS for your website. Since I have an IPv4 address, I’m going to use an A record. Your control panel, whether it’s cPanel, HestiaCP, CyberPanel, DirectAdmin, or whatever panel you’re using, is installed on a specific server, and that server has an IP address. So get that IP address and bring it to DigitalOcean here, and then add an A record.

Creating A and CNAME Records

You can enter the first record here. I’ll enter “@” — that simply means the domain. So if you enter “@”, it replaces it with mycoupons.com or whichever domain you’re using. Enter where you want it to go. If you want it to redirect to a DigitalOcean droplet, you can select a droplet there, but of course, I want it to go to this IP address, so I’m going to enter the IP address there. You can change the time to live there or just leave it at the default, then I will create the record.

So the first A record has been created. An A record is the authoritative record that redirects people to your domain. Of course, with the main domain, you also need to add a “www.” If I want to add a “www,” I will add it as a CNAME record. So I’m just going to click there on CNAME, and I’m going to add “www” and I want it to be an alias of the domain. I’m going to enter my domain there. So this is an alias of this domain. If people go there, it’s like they are supposed to get the files from this domain. You can change the time to live there; I’m just going to leave it at the default and create the record.

Checking DNS Propagation

Alright, so we have the two main records now. Where are you going to get the other records? I’m going to show you once we add the domain to our control panel. I’m going to show you where you can get the other domain records like mail records (MX records) and all those other records. I’m going to show you where you can get them and ensure you add them to DigitalOcean. Let’s just see if this has even propagated to DigitalOcean name servers.

I’m going to use DNS Checker. You can just go online and search for DNS Checker, or you can search for Name Server Checker and then go to dnscheck.org. We want to come here to NS lookup, or if you’re on the homepage, you can just enter the domain that you want to check. Here, we’re going to choose NS for the name server check, and then I will search. In certain regions, it is propagated to DigitalOcean, but if I come and try to go to the domain, let’s see if it has propagated in my region. It hasn’t.

Adding Your Domain to the Control Panel

So I’ll come back to Webuzo, and now we can add our domain. To add the domain, I’m just going to copy the domain. Whether you’re using cPanel or whichever control panel you’re using, you can add your domain. Now, if I come here to Domain, I can click on Add Domain, and I want to add it as an add-on domain. I leave the path as that. I will leave that unchecked and I will add the domain. So the domain was added successfully, and even if you try to access the domain, it is still not redirecting properly. That usually just requires some time. Just give it some time to propagate, and then once it propagates, you can access your domain without any problems. Everything takes time when it comes to DNS records.

Verifying Propagation in Different Regions

So let’s go to the Opera browser and check if there’s a region where we can access our domain. Let me turn on VPN. Let me try Europe and see if it has propagated. So that hasn’t. I’ll try a different region: Asia, perhaps.

Go. Okay, so this is showing something that I did earlier, and I created something like that. So usually it just requires some time. Just give it time; it’s going to propagate.

Adding Other DNS Records

Okay, so let’s see how to get the other records. I’m just going to go back. Go back again. Now I need to go to DNS. Is it under Domains? Yeah, under Domain DNS Zone. But on Webuzo or cPanel, you can also search there and you’re going to find your DNS Zone settings. Go there and then, of course, choose the correct domain from there. If your control panel is different, just find the DNS records for your domain. So you can see we have all these records. You can add all these records to DigitalOcean, to the DigitalOcean domains or DNS interface.

So let’s come and add one of these. We have “www.” Let’s see. Yes, we already have “www” added. Which record can we add as an example here? Okay, we can add the FTP. So let’s add this as an example. It is an A record. So I’ll come back here. Let me copy the IP in advance, then come back here. We need to add an A record. So I’ll click on A record and it is going to be FTP. FTP and then the IP address.

There is some space; make sure that there is no whitespace when you enter any of these items on DigitalOcean. So I’m going to create the record. FTP is already added. Let’s see which other one we can add. Okay, let’s add a TXT record. You’ve already seen how you can create a CNAME record, so let’s see how we can add this TXT record. Let’s do the one for DMARC. Oh no, let’s do the one for Domain Key here for DKIM. So the DMARC, SPF, and DKIM are all for email. If you’re going to use this server for sending email, make sure you add these records because if you don’t, your mail will end up in the spam folder. If you don’t want that, make sure you add the SPF, DMARC, and DKIM records.

Adding DKIM and DMARC Records

Let’s do just one example with the DKIM record. So I’m going to copy. I’m going to copy that, which is the name, and I will put it in DigitalOcean. I will come to text (TXT). I want to add a TXT record. So the value: to copy this entire thing, just do yourself a favor: click on edit and then Ctrl+A, Ctrl+C to copy everything. I’m going to paste that in there.

So here you can see that I have made a small mistake. I’m just going to paste that in there. That is the value. The value is not the name; the name actually

is the hostname. It definitely would not have made sense if it was the other way around. The value is the record itself, so just make sure you know that. And I think they should interchange this so this one comes at the top because naturally, you should just add this first and then follow with that.

So let’s see if we can add another one. Let’s add this one for DMARC. If you want to add the one for DMARC, I’m going to copy that, come back to DigitalOcean, add a TXT record, make sure you change the record up there appropriately. So the hostname is that and then the value is this. I will put the value there and then create the record.

Adding MX Records

If you have any other records that you know you’re going to need, just make sure you bring them from this side to the other side. So let’s see that MX. Let’s add an MX record there. The hostname for the MX, I will just use “@” to signify the domain name and then the mail provider. This is your mail server. So if you’re using an SMTP, make sure you add the correct domain hostname that you will be given by your SMTP. If you’re using your own server, usually it will just be mail.yourdomain.

Troubleshooting DNS Propagation Issues

So this thing propagated a long time ago and I’ve just been making a mistake. I just looked at this and I saw that the folder is public_html, and I’ve been editing the wrong one. So I’m just going to come back here. The one that we should actually be working with is this file. So I’m just going to edit the file and you’ll see that now it is changing as it should. Hello, this is it. Save, come back here, and let’s open it in a new private window, and you’ll see that everything is changing as expected. You can change it again, save, refresh, and now Cloudflare is managing your DNS as needed. I mean, DigitalOcean is managing your DNS as needed.

Adding Additional Domains

So if you want to add another domain, you want to add another domain on your control panel, the process is the same. Come back here, back to Domains, enter the domain name, choose the project, add the domain, and then add the records as I’ve shown you. Now, the next thing I want to look at before I end the video is how to add a subdomain. Maybe you want to create a subdomain called shop.yourdomain. So you can see this doesn’t redirect anywhere. What are you going to do? The first thing, come back to DigitalOcean and then add a new record. So the first record we’re going to create, of course, is the A record. If you’re using IPv6, you will start with that record. For me, I’m using IPv4, so I’m going to enter that there and then I’m going to get my IP address. So I’m just going to copy it from down here, and I can simply click copy and then I will paste and then create the record.

Creating Subdomain CNAME Record

You can also create a CNAME. Maybe you want www.shop. This is going to redirect to shop, and then I’m going to create the record.

Verifying Subdomain Propagation

At this point, if we come back here and we refresh, let’s see if it’s going to give us anything. Let’s try another region. I will try Europe. Let’s see if it has propagated in European servers. Okay, so you can see that in Europe it has propagated, so just give it time and it’s going to propagate everywhere because the way it happens is that it propagates sequentially from one place to another until all the DNS servers have been updated. If you want to install anything on that, you can install it. If you want to add it to your control panel, you can do so. I’m just going to click there, add new, and I will add the subdomain, remove the protocol and remove that as well, and I want to add it as an add-on domain. If you want to use it as a full domain on its own, just add it as an add-on domain. With that, I’m going to add the domain. The domain was added successfully.

Conclusion

Let’s come back here. Can I open it in a new private window and get accurate results this time around, or should I still use the VPN? Okay, so just give it time; it’s going to propagate. Don’t worry about that. That’s all about time.

Alright, so in this video, I’ve shown you how you can use DigitalOcean to manage your DNS. It doesn’t matter which control panel you’re using; you can use the control panel with DigitalOcean without any problems. Once you add the domain, make sure you copy the records just like you’re supposed to. To use DigitalOcean, all you have to do is add your domain under Domains, under Networking, add your domain there, choose a project, add the domain, and then go to your domain registrar and add the name servers that you’ll get from DigitalOcean. Where are the name servers? The name servers are here in these NS records. Just copy that, that, and that, and add them to your domain provider. Then, once you do that, you can add your domain to your control panel. But most importantly, if you’re going to add your domain on a control panel, at least ensure you have an A record that matches the IP address for your server. That way, if you create the domain on the control panel, you can generate Let’s Encrypt. So make sure you have an A record for your domain and you also have a “www” record.

That should summarize this tutorial. If you have any questions, feel free to let me know. I will see you in another video next time.


Discover more from Bizanosa

Subscribe to get the latest posts sent to your email.

Comment Here

Join this free course:

How to host multiple WordPress
websites on a VPS

Close me!