After creating a droplet or server with DigitalOcean you may want to assign it a domain name, below is detailed guide on how to point your domain name to digitalocean droplet.
Things You Need
- Droplet on DigitalOcean
- A Domain Name.
- IP Address of your droplet.
Step 1: Setting up Nameserver
For this tutorial I’m using namecheap, you may have bought domain from some other provider but don’t worry check out this article on how to add nameserver, DigitalOcean has covered almost all domain name provider.
- Login to your domain name provider account.
- Now click on manage domain and select the domain you want to point to DigitalOcean droplet.
- Now search for an option called DNS (Domain Name Server) or just NameServer.
- Select custom DNS and add following three Nameserver to field.
Step 2: Pointing Droplet IP to domain name
- Now login to your DigitalOcean account
- Select Networking from navigation menu
- Now in Domain tab you will see an option to add a domain
- Enter your domain name and droplet IP in input box and click on Create Record button.
- Now your Domain name setting should look something like following image.
In above image I’ve added extra CNAME field with text www which is pointing to howlthemes.com, I did this because I wanted my howlthemes.com to redirect to www.howlthemes. So in simple words I redirected non-www URLs to www.
If you face any problem then feel free to comment below.