There are a few ways to manage your domain and direct it to the relevant location. This quick guide will show how you can point a single domain to a Digital Ocean droplet running a Ubuntu 16.04.4.
Update Domain NameServers
You should be able to do this with all/most domain registrars out there. In some scenarios you may need to request they do this on your behalf, but I haven’t had to do that for the best part of a decade – how things have changed.
I’ll outline how to do this with 123-Reg, which is my registrar of choice. The process will be very similar for any registrar out there, we just need to change a few values in some text boxes.
Login to your account and find the domain you wish to point to your Digital Ocean server. Click ‘Manage’ (I imagine this could be ‘Settings’ or alike on other services).
You should be presented with a screen that lets you mange lots of different aspects of that domain. Under the “Advanced domain settings” heading click “Change Nameservers”.
If you’re using a different domain registrar and cant find the Nameserver settings, a simple search for “Go Daddy change nameservers” or similar will likely result in a guide.
You’ll see a number of text boxes with the default nameserver values for wherever the domain was registered. Update these to the Digital Ocean nameservers:
Replace the current values with the ones above and click ‘Update’. That’s all there is to do on this side of things.
Digital Ocean Networking Settings
Head over to your Digital Ocean account and go to the ‘Networking’ tab.
Enter the domain you wish to add (without the www prefix, and obviously must be the domain that you purchased) and click ‘Add Domain’.
Select the domain you just added and create a new ‘A’ record for it – this should be selected by default when the page loads. In the ‘Hostname’ field add “@”. Then select the corresponding droplet you want this to point to. You can leave the TTL settings as default. With that done click “Create Record”. This should be enough to get your domain pointing to your droplet.
Important Note: This is unlikely to happen instantly! Wait at least 24 hours and try, although it will likely happen a little faster (it can be useful to clear your browser cache during this period).