Connecting a GoDaddy Domain to a DigitalOcean Droplet
Published on Dec 17, 2024
If you have a domain registered outside of your cloud or server provider. Pointing your domain to the server is easier than you can imagine. In very concise way, the process involves only two main steps:
First Step: Adding the domain to the host provider and adding necessary records to it.
Second Step: Changing the nameservers for your domain in the domain provider
That's it!
Those are the only two steps required for transferring domains, no matter what domain provider or server provider you'r dealing with.
In this article I'm going to go through this process step by step using an existing domain in Godaddy and a droplet with nginx installed on it on Digital Ocean.
If you don't have an account yet on digital ocean, you may signup through this link and get $200 credit.
Adding domain to Digital Ocean droplet
1- copy droplet public IP
Navigate to droplets and copy public IP of the droplet you want to connect domain to it.
2- Create Domain Route
Click on the Create green button on the top right and select Domains/DNS
Navigate to the domain route we have just created and create two A records in the HOSTNAME first A record Enter @ choose your droplet to redirect it to this will add a redirection for your basic domain ex: dev-talks.io.
Add a new A record in the HOSTNAME Enter www and choose same droplet this will add a record for www.dev-talks.io
Go to your account on Godaddy open products and click on DNS in the domain settings, navigate to NameServers then click Change to update it to digital ocean nameservers like the following: