Resend domain setup: DNS records, statuses and keys

The exact DNS records Resend asks for, what each verification status means, the two API keys to create, and the errors an unverified domain returns.

Simon, Founder of Shipyard

By · Founder of Shipyard

7 minute read

The records, first

To send from your own address with Resend you add the domain, publish three DNS records that Resend generates (one DKIM record and two SPF records on a send subdomain), add a DMARC record of your own, and wait until the domain status reads verified. Then you create a sending-only API key for the app. Until the domain is verified, the API only lets you send test mail to your own address.

For a domain example.com in the default region, the set looks like this. The DKIM value is a public key unique to your domain, and the MX value contains the region you chose, so always copy both from the Records tab of your domain in Resend.

Some domains are shown CNAME records instead of this TXT and MX set. The rule is the same either way: publish exactly what the Records tab lists, nothing adapted from a tutorial.

PurposeTypeNameValueNotes
DKIMTXTresend._domainkeyp=MIGf... (your key)Lets receivers check that Resend signed the message for you.
SPF, bounce handlingMXsendfeedback-smtp.us-east-1.amazonses.comPriority 10. The region in the name must match the domain's region.
SPFTXTsendv=spf1 include:amazonses.com ~allNames the servers allowed to send for the send subdomain.
DMARCTXT_dmarcv=DMARC1; p=none; rua=mailto:you@example.comYours to add. Not needed for verification.

Why these records do not disturb your inbox

Look at the Name column. The sending records live on send.example.com and resend._domainkey.example.com, not on the bare domain. That is deliberate. send is the Return-Path, the hidden address bounces go back to, and SPF is checked against it. Your bare domain's own MX records, the ones that decide where mail to hello@example.com is delivered, are untouched. You can run Google Workspace, Cloudflare Email Routing or nothing at all on the root and Resend on the same domain without the two colliding.

The one place they do collide is a name that already holds a CNAME. A CNAME cannot share a name with any other record, so if send is already a CNAME to something else, pick a different Return-Path subdomain when you add the domain.

Bare domain or subdomain

Resend recommends adding a subdomain such as updates.example.com instead of the bare domain, so that the reputation of product mail is kept apart from anything else you send later. The cost is the address: with only the subdomain verified, the From address has to be on that subdomain, and mail from hello@example.com is refused.

Shipyard adds the bare domain and sends from hello@yourdomain, because a new product has no other mail stream to protect and a plain address reads better in a receipt. If you expect to send newsletters from the same domain later, add a second, separate subdomain for those at that point.

Adding the domain

The same thing through the API is two calls: create the domain, which returns the records as JSON, then ask Resend to start checking. This needs an API key with Full access.

  1. In Resend, open Domains and press Add Domain.
  2. Enter the domain and choose a sending region: us-east-1 (North Virginia, the default), eu-west-1 (Ireland), sa-east-1 (São Paulo) or ap-northeast-1 (Tokyo). Choose the one nearest your recipients. A region cannot be changed afterwards; you would delete the domain, add it again and replace the DNS records.
  3. Open the Records tab and create each record at your DNS provider.
  4. Press Verify DNS Records. The status moves from not_started to pending.
  5. Add the DMARC record once the status is verified.
Terminal
curl -X POST 'https://api.resend.com/domains' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d '{ "name": "example.com", "region": "eu-west-1" }'

# the response lists each record: record, name, type, value, priority, status

curl -X POST 'https://api.resend.com/domains/<domain id>/verify' \
     -H 'Authorization: Bearer re_xxxxxxxxx'

Entering the records at Cloudflare

If your DNS is at Cloudflare, Resend also offers a Sign in to Cloudflare button on the domain page that creates the records for you after you authorise it.

What each status means

Verification often completes within about 15 minutes of the records going live. The statuses tell you which side to look at when it does not.

Terminal
nslookup -type=TXT resend._domainkey.example.com
nslookup -type=MX send.example.com
nslookup -type=TXT send.example.com
StatusMeaningWhat to do
not_startedDomain added, checking never requested.Press Verify DNS Records.
pendingResend is looking for the records.Wait, and check the records from outside.
verifiedSending from this domain works.Create the sending key.
partially_verifiedOne of two CNAME records, or one of sending and receiving, is still pending.Sending works; finish the remaining record.
failedThe records were not found within 72 hours.Fix the records and restart verification.
temporary_failureA verified domain whose records have since gone missing. Resend rechecks for 72 hours before failing it.Restore the record you removed.

When it stays pending

Two keys, not one

Adding and verifying a domain needs a key with Full access. Your application should not hold that key. Create a second key with the sending_access permission and restrict it to the one domain; if it leaks, the holder can send as that domain and do nothing else. A sending key that tries anything else gets a 401 with the name restricted_api_key.

The key value is in the token field of the response and that is the only time you see it. Shipyard stores it in the keychain on your computer and writes it to the host as RESEND_API_KEY; if the stored value is ever missing, it deletes the key and creates a new one, because there is no way to read an existing key back. Key names are limited to 50 characters.

Terminal
curl -X POST 'https://api.resend.com/api-keys' \
     -H 'Authorization: Bearer re_xxxxxxxxx' \
     -H 'Content-Type: application/json' \
     -d '{ "name": "acme production", "permission": "sending_access", "domain_id": "<domain id>" }'

The parts Shipyard does

Shipyard creates the domain at Resend in the region you set, writes the returned records and the DMARC record into your Cloudflare zone as DNS-only records, requests verification and checks every 15 seconds for up to 20 minutes, asking again if Resend reports a failure. It then creates the domain-restricted sending key, stores RESEND_API_KEY and EMAIL_FROM on your host, and its health check sends one message to delivered@resend.dev. If a different SPF or DMARC record already sits on the same name it stops and tells you, since it never edits records it did not create.

You create the Resend account and the Full access key. As of November 2026 the free plan allows up to three domains, so a fourth product needs a paid plan or a removed domain first.

Errors from the send endpoint

StatusNameMessageCause
403validation_errorYou can only send testing emails to your own email addressNo verified domain yet, and the From address is Resend's shared test sender.
403validation_errorThe example.com domain is not verifiedThe From address is on a domain, or a subdomain, that is not the verified one.
401restricted_api_keyThis API key is restricted to only send emailsA sending key was used to manage domains or keys.
429rate_limit_exceededToo many requestsMore than the default 10 requests a second for the team.
429daily_quota_exceededYou have exceeded your daily email sending quotaThe free plan's daily limit, 100 emails as of November 2026. It resets at midnight UTC.

DMARC, started gently

DMARC tells receiving servers what to do with mail that claims to be from your domain and fails SPF and DKIM. A verified Resend domain passes both, so the record costs nothing to add. Start with p=none, which changes nothing about delivery and only asks for reports. The rua tag is the address those reports, emails with an XML attachment, go to. When the reports show all your real mail passing, move to p=quarantine and later p=reject.

Shipyard writes v=DMARC1; p=none and adds rua=mailto:hello@yourdomain only when you asked for a mailbox on the domain, since a report address that bounces is worse than none.

A test send that cannot hurt your reputation

Do not test against invented addresses. Resend answers 422 for placeholder domains such as example.com and test.com, and a real bounce counts against a new domain from the first message. Resend provides sink addresses that simulate each outcome: delivered@resend.dev, bounced@resend.dev and complained@resend.dev. You can add a label, as in delivered+signup@resend.dev, to tell tests apart in the logs. After that passes, send one message to a real inbox you own and read the headers: SPF and DKIM should pass, and the DMARC result should read dmarc=pass.

Sources

Launch in an hour, not a weekend

Shipyard connects your accounts once, then sets up the domain, hosting, database, email and payments for every new product.

See how it works

Read next