Hi everyone,
I recently set up a Droplet on DigitalOcean, and now I’m trying to point my custom domain to the Droplet using DigitalOcean’s DNS management. What steps should I take to configure the domain properly?
I’ve already registered the domain with an external domain registrar, but I’m not sure how to set the correct DNS records and which ones are necessary for both the website and email. Any advice on the types of records I need (A, CNAME, MX) and how to configure them would be really helpful!
Or shall I use my domain provider to handle my DNS records?
Thanks in advance!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Hey there! 👋
You’re on the right track! Pointing your domain to a DigitalOcean Droplet using DigitalOcean’s DNS is pretty straightforward.
First, head over to the DigitalOcean Control Panel and click on “Networking” in the left-hand menu. Then, under the Domains tab, add your custom domain (e.g.,
yourdomain.com
) by typing it in the box and clicking “Add Domain”.You’ll need to point your domain’s nameservers to DigitalOcean’s. Go to your domain registrar’s control panel (where you bought your domain) and update the nameservers to:
This might take a little while to propagate, so don’t worry if it’s not instant.
Next, in the DigitalOcean Networking tab where you added your domain, you’ll need to create an A Record that points to your Droplet’s IP address. Here’s how:
@
(this means the root domain, likeyourdomain.com
)Click Create Record after you’ve filled in these fields.
If you have subdomains or email services, you might need to add more DNS records:
CNAME Record: For subdomains, like
www.yourdomain.com
, create a CNAME record:www
yourdomain.com
MX Records: If you’re setting up email, make sure to add MX Records provided by your email hosting provider.
DNS changes usually take some time to propagate. You can use tools like WhatsMyDNS to check if the changes have taken effect globally.
If you’re worried about security, you can also use DigitalOcean Cloud Firewalls to restrict access to your Droplet. It’s super easy to set up and allows you to control inbound and outbound traffic.
You can find more about it here:
DigitalOcean Firewalls Documentation
Let me know how it goes, and feel free to reach out if you need any more help! 😄
- Bobby