Add DNS records at DigitalOcean

Short answer: If your domain’s name servers are DigitalOcean’s, you add email records in the DigitalOcean Control Panel: Networking, then Domains, then your domain, then Create a record and choose TXT. Type @ as the hostname for the root domain, paste the value your mail service gave you, and save. Edit your existing SPF record instead of adding a second one.

Reviewed

This page is for store owners whose domain’s DNS is managed at DigitalOcean and who need to add or fix SPF, DKIM or DMARC records. It paraphrases DigitalOcean’s own documentation, read on 2026-11-19 (links at the end). Screen names are as of November 2026. If DigitalOcean changes its pages, trust its pages over ours. This is an independent guide. The overview for all providers is on the DNS provider hub.

Symptom

You see one of these:

  • A mail service, or our free checker, tells you to add a TXT record, and you do not know where.
  • A checker says your SPF, DKIM or DMARC record is missing.
  • Your store emails go to spam or are rejected.
  • You are not sure your domain’s DNS is at DigitalOcean at all.

Why it happens

Email checks read records in your domain’s DNS. DNS is the public address book for your domain. Those records are edited at whoever runs your domain’s name servers (the servers that answer for your domain). That may not be where you bought the domain, or where your store is hosted. It is never edited in WordPress.

DigitalOcean’s DNS is used only if your domain’s name servers at your registrar (where you bought the domain) point to DigitalOcean. DigitalOcean’s documentation lists them as ns1.digitalocean.com, ns2.digitalocean.com and ns3.digitalocean.com. If your domain uses other name servers, records added in DigitalOcean do nothing. Add them at the provider that runs those name servers instead.

A TXT record is a line of text attached to a name in your domain. SPF, DKIM and DMARC are all published as special TXT records. DigitalOcean’s documentation says you create them with the TXT option.

Fix

The values below use example.com. Your real values come from your mail service. Copy them exactly. This page does not invent values for any service.

  1. Check that DigitalOcean runs your DNS. Look up the name servers of your domain, for example with the plugin (see below) or at your registrar. They should be the three DigitalOcean names above. If they are not, stop and use the provider they point to.
  2. Open the domain. Sign in to the DigitalOcean Control Panel, open Networking, choose the Domains tab, and click your domain.
  3. Create a TXT record. Click Create a record and choose TXT. The form has two fields:
    • Hostname: type @ for the root domain, which means example.com itself. For any other name, type only the part before your domain. For a DMARC record that is _dmarc, not _dmarc.example.com. DigitalOcean describes this field as the subdomain prefix, so we do not type the full name.
    • TXT Value: paste the value from your mail service, with no extra spaces before or after it.
  4. Save. Click Create Record.
  5. Edit your SPF record, do not add a second one. A domain may have only one SPF record. It is the TXT record whose value starts with v=spf1. In the list of records, find it. Open the More menu (the three dots) on its right and choose Edit record. Add your mail service’s include: part before the final ~all or -all, then save. For example, v=spf1 include:_spf.example.net ~all becomes v=spf1 include:_spf.example.net include:spf.example.org ~all. The services in that example are made up. If you have no SPF record yet, create one as in step 3 with @ as the hostname. See How to add or fix an SPF record for what to put in it.
  6. Add the DKIM record. Your mail service shows a name (often with a part like selector1._domainkey) and a value. In the form, put the name in Hostname without .example.com at the end, and the value in TXT Value. Some services give DKIM as CNAME records instead of TXT. Add them exactly as your service shows them, and use the record type it names. See How to set up DKIM.
  7. Add the DMARC record once SPF and DKIM pass. Create a TXT record with the hostname _dmarc. A cautious first value is v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com, where p=none only monitors and the address is one you read. See DMARC for beginners.
  8. Be careful with a long value and with quotes. DigitalOcean’s pages that we read do not say whether to type quotation marks around a TXT value, or how a very long value, such as a long DKIM key, is handled. So paste exactly what your mail service shows, check the saved record in the list, and run the check below. If your service shows a long key in several pieces, ask DigitalOcean support how to enter it.
  9. Wait. DigitalOcean gives a time only for name server changes (about 30 minutes to several hours). It gives none for a record change. DigitalOcean also notes that every record needs a TTL of at least 30 seconds. TTL is how long other servers keep an answer before asking again. A lower TTL makes later edits show up sooner.

Check it worked

  1. Run the free checker on the domain your store sends from. SPF should show one valid record. The DKIM line may say “Not checked” because the checker only tries common selector names; see the DKIM guide.
  2. Send a real order email to a mailbox at a large provider. Open “show original” and look for spf=pass and dkim=pass, and for dmarc=pass if you added DMARC.
  3. If a record does not show after a few hours, open it again in the DigitalOcean list and compare it with what your mail service gave you. Check the hostname first: a doubled domain such as _dmarc.example.com.example.com is the usual slip.
  4. If mail still lands in spam, see WooCommerce emails not sending or going to spam.

How the plugin helps

In its “How to fix this” panel, Email Health Check & Log for WooCommerce reads the name servers of your mail domain and, when they end in digitalocean.com, shows “DNS hosted at: DigitalOcean”. Under it are a short general note (your records are edited in the Networking section of your DigitalOcean account, under your domain, not in WordPress) and a “DigitalOcean documentation” link to the page this guide uses. The plugin has a docs link for DigitalOcean. If the name servers match none of the providers it knows, it shows nothing, so the name servers can point somewhere other than where you think your DNS is: trust what the name server lookup says. For a public mailbox domain such as gmail.com it does not look anything up. The detection sends none of your data to us or to DigitalOcean. It is an ordinary DNS lookup of your domain’s name servers, kept for a few hours. The plugin changes no DNS records. The line appears in a check’s “How to fix this” panel, and it reads “Hosting and DNS:” instead when your web host is detected with high confidence as the same company as your DNS. Get the plugin on WordPress.org.

DigitalOcean and other product names belong to their owners. They are used here only to say what a company’s documentation says. This page is not affiliated with or endorsed by any of them.

Check your own domain

Type your domain into the free checker to see whether your SPF, DKIM and DMARC records are in place. Or install the free plugin, which checks the basics from inside your dashboard.