Skip to content

Manage DNS on DigitalOcean

Use this guide to manage DNS at DigitalOcean.

Requirements

You’ll need the following before you can manage DNS at DigitalOcean:

  • A DigitalOcean account.
  • A domain you’ve registered at any domain registrar.

Learn how to create a DigitalOcean account and project.

Manage DNS zones

All DNS records belong to a DNS zone.

Create a DNS zone

Use your registered domain name as the name of your DNS zone. A registered domain name, also known as an apex domain, is a domain such as example.com.

  1. In the DigitalOcean dashboard, go to the Domains page.
  2. In the Add a domain section, enter your registered (apex) domain name. Do not include www or any other subdomain.
  3. Click Add domain.

Update nameservers

DNS queries for your domain will be answered by DigitalOcean’s DNS servers after you update your domain’s nameservers at your domain registrar.

When using DigitalOcean to host DNS for your domain, your domain’s nameservers are:

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

To update your domain’s nameservers, do the following:

  1. Log into your domain registrar (the site where you purchased your domain).
  2. Select your domain and choose the option to edit the domain’s nameservers.
  3. Add the DigitalOcean nameservers shown above.
  4. Remove the old nameservers.

Delete a DNS zone

When you delete a DNS zone, the zone and its records will be deleted.

  1. In the DigitalOcean dashboard, go to the Domains page.
  2. In the Domains section of the page, find the row with the domain name of the DNS zone to delete and click More on the right side of the row.
  3. Click Delete.
  4. In the confirmation box, click Delete domain.

Manage DNS records

Create and delete DNS records in your DNS zone.

Create a DNS record

Use the instructions below to create a DNS record.

  1. In the DigitalOcean dashboard, go to the Domains page.
  2. In the Domains section of the page, click on the domain name of the DNS zone in which you want to add DNS records.
  3. In Create new record, click on the type of DNS record you want to create.
  4. In Hostname, enter the subdomain of the new DNS record. For example, enter www. If the DNS record is for the registered (apex) domain, enter @.
  5. Enter the value of the DNS record. For example, if you are adding an A record, enter your server’s IP address in the Will redirect to field.
  6. Change the TTL to 300.
  7. Click Create record.

Delete a DNS record

Use the instructions below to delete a DNS record.

  1. In the DigitalOcean dashboard, go to the Domains page.
  2. In the Domains section of the page, click on the domain name of the DNS zone which contains the DNS record you want to delete.
  3. In the DNS records section of the page, find the row with the DNS record to delete and click More on the right side of the row.
  4. Click Delete.
  5. In the confirmation box, click Delete record.