Namecheap and DigitalOcean are my favorite domain provider and cloud infrastructure provider, respectively. There are other domain providers such as GoDaddy and Domain.com, however, I have been using Namecheap for a long time and I have no complaints about it so far so I am sticking with it. As for cloud infrastructure provider, one great alternative is AWS but, for smaller projects, I find DigitalOcean cheaper and more intuitive to use. These are the reasons why I use Namecheap and DigitalOcean and we will cover in this article how to connect these two platforms.


Configuring Namecheap

Assuming that you have already bought your domain, you can manage your domain from the Dashboard tab or Domain List tab. If you haven't bought your domain just yet, I will be writing an article on how to buy a domain, for now, you can refer to this link.

From this page, click the Manage button for the respective domain and it should bring you to a page similar to the image below:

The only fields we need to change are the fields under NAMESERVERS. From the dropdown, select Custom DNS and add the following nameservers.

  • ns1.digitalocean.com
  • ns2.digitalocean.com
  • ns3.digitalocean.com

The resulting page changes should look like this:


Configuring DigitalOcean

Once in DigitalOcean, linking a domain to an existing server is straightforward. First, under Manage, select Networking tab and you should see a page similar to the image below:

From here, enter the domain on the field that says "Enter domain". After that, the Add Domain button will be enabled.

Click the Add Domain button and the following page should appear:

Notice the values in each NS row. Most of the time, the values should be ns1.digitalocean.com., ns2.digitalocean.com., and ns3.digitalocean.com.. These are the values we have entered in Namecheap on the previous section. If these are different, adjust the values you have set in Namecheap with the values found here (Remember to remove the last dot "." and only enter ns[1/2/3].digitalocean.com in Namecheap).

Once you are on this page, we need to link the domain to our server. To do this, type @ in the Hostname field. Afterwards, click the field Will Direct To and a list of available servers should be shown. Select the server from this dropdown or you may also choose to type the IP address manually.

The final step is to click Create Record and the list of DNS records should now be updated with a new A record.

Now, we have to wait for a few minutes (usually around 30 minutes) up to about a day or two for the DNS changes to propagate before being able to access your server using your domain. To verify that the changes have propagated, follow the steps below.


DNS Propagation

Before you can access your server using your new domain address, nameservers from different parts of the world need to be updated first. The changes should take effect in around 30 minutes but, in the worst case, it could take up to 72 hours. Here are the steps on how to verify if the nameservers are already updated:

Step 1: Go to whatsmydns.net.

Step 2: Enter the domain name and click Search. A list similar to the image below should appear.

A quick way to analyze this list is by looking at the check or cross marks on the right hand side. If it is a cross, it means that the server is not yet updated. If it is a check, it means that it is already updated.

One important note - it is important to check if the IP address is also correct. If this domain was previously connected to a server, it may still be pointing to the old one even if it has the check mark. Therefore, the IP address must also be validated.

If the nameserver near you or most of the nameservers are already updated, you may already try accessing your server using your domain.


Closing

Connecting Namecheap domain with DigitalOcean server only requires few simple steps: Namecheap modification, DigitalOcean modification, and DNS propagation verification. If you have correctly followed the steps in this article, your server should be accessible using your domain name in no time. Feel free to let me know if you have any questions or if you have encountered any issues along the way.


References: