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
.
- In the DigitalOcean dashboard, go to the Domains page.
- In the Add a domain section, enter your registered (apex) domain name.
Do not include
www
or any other subdomain. - 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:
- Log into your domain registrar (the site where you purchased your domain).
- Select your domain and choose the option to edit the domain’s nameservers.
- Add the DigitalOcean nameservers shown above.
- Remove the old nameservers.
Delete a DNS zone
When you delete a DNS zone, the zone and its records will be deleted.
- In the DigitalOcean dashboard, go to the Domains page.
- 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.
- Click Delete.
- 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.
- In the DigitalOcean dashboard, go to the Domains page.
- In the Domains section of the page, click on the domain name of the DNS zone in which you want to add DNS records.
- In Create new record, click on the type of DNS record you want to create.
- 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@
. - 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. - Change the TTL to
300
. - Click Create record.
Delete a DNS record
Use the instructions below to delete a DNS record.
- In the DigitalOcean dashboard, go to the Domains page.
- 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.
- 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.
- Click Delete.
- In the confirmation box, click Delete record.