Route Your Domain To DigitalOcean

Table of Contents

Introduction to DNS, IP and Domain Name

Domain Name System (DNS) are the equivalent of a network’s phonebook. They maintain human-friendly domain names and resolve these human friendly names to IP addresses. While it is easy for people to remember domain names, computers use IP addresses to communicate.

Internet Protocol (IP) address is a unique identifier label assigned to each device that connects to a network whether local or external. IP addresses are four numeric numbers separated by dots (41.45.1.150). Each number can range between 0 and 255. An IP address must be unique within its network or domain.

A Domain Name is an alias for an IP address. A domain name allows people to use easy to remember names for websites instead of IP addresses. You can identify a domain name from an email by reading the part that comes after the “@” sign. To obtain a domain name, you must purchase it from a domain registrar. Every domain name is unique.

Update Domain Name DNS Servers

  1. Login to your domain name provider (registrar who registered your domain) account

  2. Select the domain you want to point to your DigitalOcean Droplet

  3. Under Manage Domain, look for option for changing nameservers. Your registrar may provide instructions on how to change your domain nameservers.

  4. Select custom DNS and change nameserver values to the following:

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

    alt=“Update domain registrar DNS”

  5. Save the changes

Add Domain to DigitalOcean

  1. Login to your DigitalOcean account.

  2. Click Create button and select Domain/DNS

    alt=""

  3. Type your domain name in the Enter domain field and click Add Domain.

    DigitalOcean add domain

  4. Add an A record. An A record maps an IPv4 address to a domain name which determines where to direct any requests for a domain name.

  • Under HOSTNAME, type @ to add the your root domain (ex. toodo.deitagy.com). To add a subdomain under your domain, type the name of subdomain. If the name you entered for your domain includes a subdomain, then only type @
  • Under the WILL DIRECT TO select your Droplet
  • Click on Create Record
  • Repeat the process if you wish to add more domains or subdomains
  1. Wait for the changes to be applied which may take some time.
  2. Ping your Droplet using the domain or subdomain name instead of the IP address
    • Open Terminal window
    • Type ping <your domain name> -c4. Using my domain name, I type ping toodo.deitagy.com -c4. The number after -c is the count of the pings that I want performed.

You can add comments or suggestions related to this post on Medium