How to add a Domain on DigitalOcean from Namecheap

Continuing the series of articles on administering and deploying a project on the Internet on DigitalOcean, today I decided to talk about how to link a domain to an account on DigitalOcean. The domain itself was bought on Namecheap, so the demonstration will be on the example of its panel, however, the basic steps will be identical, even if you use a different panel.

Before you start, at this point you should have:

  • Purchased domain from Namecheap
  • Add domain to DigitalOcean VPS droplet

If you don’t have an account on DigitalOcean yet, then in one of the previous articles I wrote how you can register and get free 2 months of using this free DigitalOcean Promo Code

Part 1: Change Domain DNS Records in Namecheap Domain Control Panel

– Login to your Namecheap account

– Go to the Domain List page under the Account menu tab


Click on Manage Domains Manage


Then, on the domain tab that opens, in the Nameservers item, select the Custom DNS option


And in the input field that appears, add 3 DNS records:
And save these changes by clicking on the Save button

It can take up to 24 hours for DNS records to change.

Step 2: Adding and Configuring a Domain in the DigitalOcean Panel

  • Sign in to your DigitalOcean account

– Go to Manage> Networking tab

Enter your domain name in the form that appears: add domain
And click on the Add Domain button.

digitalocean add_domain

Now you need to add an A-record to the menu for managing this domain, which will indicate which DigitalOcean droplet this domain is linked to.
To do this, enter @ in the Hostname field, this is a short form of your domain name. That is, @ is the main address (in my case,
After that, click on the Will direct to field, and in the pop-up window, select the droplet that this domain will refer to.

AAAA records are similar to A records, differing only in that they are for IPV6, while A records are for IPV4. And you can use both of these recordings without any problem.

Optionally, you can add CNAME records, thanks to which you can specify aliases for the domain. For example, we can add an entry that at will allow you to open the main host of the site subdomain.


In this article, I, using Namecheap as an example, demonstrated setting up a domain on DigitalOcean, answered the question of how to bind a domain to DigitalOcean vps hosting, which DNS records to register, and how to completely  add a domain to digitalocean from Namecheap.