Send from your own domain
This guide covers sending mail through EmailsDoWork From an address on your own domain, such as news@<your-domain>. You register the domain with us, add two DNS records, run a verification check, and send a test.
What you need
- An EmailsDoWork account and an API key for it. You can also do every step below from the dashboard's Sending domains page (/app/domains).
- Access to the DNS records for your domain. Step 1 shows how to find where they live.
- The exact domain you will send from. Verification covers that one domain. Verifying
<your-domain>does not covernews.<your-domain>, so register each domain or subdomain you put in a From address.
How authentication works for your mail
Gmail, Yahoo, Outlook and most other mailbox providers check DMARC. DMARC passes when a domain that passed SPF or DKIM matches the domain in your From address.
Your mail passes DMARC through DKIM. EmailsDoWork signs each message with a key that belongs to your domain (d=<your-domain>, selector edw1), and you publish the public half of that key in DNS.
SPF is checked against the bounce address (the Return-Path, or envelope sender), and on EmailsDoWork mail that address is always on our domain: bounce+<id>@mail.emailsdowork.com. That is how bounces find their way back to us. SPF passes for mail.emailsdowork.com, but that domain is not your From domain, so SPF does not count toward DMARC for your mail. The DKIM record is the one that has to be right.
Step 1: Find where your DNS is hosted
The company you bought the domain from (the registrar) is not always the company that answers DNS for it. Records go wherever the domain's nameservers point. To check, run:
dig NS <your-domain> +short
Or look at the "Nameservers" field in your registrar account.
For example, say example.com was bought from Hover, but its nameservers are Cloudflare's:
$ dig NS example.com +short
<name>.ns.cloudflare.com.
<name>.ns.cloudflare.com.
Then its records are edited in Cloudflare. A record added at Hover would never be seen.
Step 2: Back up your DNS zone
Before you change anything, export the whole zone. In Cloudflare, go to DNS, then Records, then Export. Other DNS hosts have a similar export or download option.
Also save your current SPF record exactly as it is, so you can put it back:
dig TXT <your-domain> +short
The SPF record is the line that starts with v=spf1.
Step 3: Register the domain
From the dashboard, open Sending domains and add the domain. Or call the API with your key:
curl -X POST https://mail.emailsdowork.com/domains \
-H "X-API-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{"domain": "<your-domain>"}'
A 201 Created response returns the domain's id, status: "pending", and the DNS records to publish:
{
"id": "<domain-id>",
"domain": "<your-domain>",
"status": "pending",
"dkim_selector": "edw1",
"verification_token": "edw-verify-<random>",
"verified_at": null,
"dns_records": [
{"purpose": "ownership", "type": "TXT", "host": "_edw-verify.<your-domain>", "value": "edw-verify-<random>", "required": true},
{"purpose": "dkim", "type": "TXT", "host": "edw1._domainkey.<your-domain>", "value": "v=DKIM1; k=rsa; p=<public key>", "required": true},
{"purpose": "spf", "type": "TXT", "host": "<your-domain>", "value": "v=spf1 include:mail.emailsdowork.com ~all", "required": false},
{"purpose": "dmarc", "type": "TXT", "host": "_dmarc.<your-domain>", "value": "v=DMARC1; p=none; rua=mailto:dmarc@mail.emailsdowork.com", "required": false}
]
}
Save the id; you need it to verify. The response also includes last_checked_at and created_at. A 409 Conflict means the domain is already registered, either on your account or on another one. Contact support if you didn't register it.
You can fetch the records again at any time with GET /domains/<domain-id>.
Step 4: Add the two required records
Add two new TXT records at your DNS host:
| Name | Type | Value |
|---|---|---|
_edw-verify.<your-domain> | TXT | the edw-verify-… token from the response |
edw1._domainkey.<your-domain> | TXT | the full v=DKIM1; k=rsa; p=… value from the response |
Most DNS hosts, Cloudflare included, add your domain to the name for you. In that case type only _edw-verify and edw1._domainkey in the Name field. If you type the full name, some hosts save it as _edw-verify.<your-domain>.<your-domain>, and verification will fail.
The DKIM value is longer than 255 characters. Paste the whole value. If your DNS host splits it into several quoted strings, that is fine, because receivers join the strings back together.
Leave everything else alone. If you already use a mail provider, keep it:
- Don't change your MX records.
- Don't touch DKIM records that belong to other providers. For example, Mailchimp signs with
k2._domainkeyandk3._domainkeyCNAME records; those stay. - Don't add a second SPF record (see Step 5).
Step 5: Update SPF (recommended)
The SPF change is recommended rather than required, and verification does not check it. As explained above, receivers check SPF for EmailsDoWork mail against mail.emailsdowork.com, not your domain. Adding EmailsDoWork to your own SPF record is still good practice, and some checkers expect it.
If your domain has no SPF record, add the one from the response:
v=spf1 include:mail.emailsdowork.com ~all
If your domain already has an SPF record, edit that record. Never add a second one: two v=spf1 records on the same name make SPF fail for all of your mail, including mail from your existing provider.
The 10-lookup limit
SPF allows at most 10 DNS lookups while a receiver evaluates your record. Past that, the result is an error, and DMARC treats an SPF error as a failed check. Receivers evaluate terms from left to right and stop at the first one that matches the sending server.
How to count lookups:
include:,a,mx,ptr,exists:andredirect=each cost 1.- An
include:also costs whatever its target record costs, so look up each included record and count its terms too, all the way down. ip4:,ip6:andallcost 0.
You can count by hand with dig TXT <name> +short on each included name, or paste your domain into any SPF checker.
Worked example: a domain whose mail is hosted at Hover
Say example.com already sends its everyday mail through Hover. Its SPF record is:
v=spf1 include:_spf.hostedemail.com include:hover.com ~all
It already needs 11 lookups when fully expanded:
| Term | Lookups | Why |
|---|---|---|
include:_spf.hostedemail.com | 1 | its record holds only ip4: terms |
include:hover.com | 1 | plus the 9 below |
| ↳ hover.com's 6 includes | 6 | _spf.hostedemail.com, support.zendesk.com, servers.mcsv.net, mail.zendesk.com, registrarmail.net, _spf.emfwd.name-services.com |
↳ support.zendesk.com includes mail.zendesk.com | 1 | |
↳ _spf.emfwd.name-services.com includes _spf.hostedemail.com and relay.mailchannels.net | 2 | |
| Total | 11 |
Adding include:mail.emailsdowork.com at the end would put it past the limit: a receiver would hit the error before ever reaching it. Instead, add the sending IP as an ip4: term ahead of include:hover.com:
v=spf1 include:_spf.hostedemail.com ip4:50.116.60.18 include:hover.com ~all
ip4: costs 0 lookups, and a receiver checking mail from EmailsDoWork matches it after a single lookup.
Two notes on this example:
- The record as a whole still counts 11, so strict SPF checkers will flag it. That was true before the change. Removing includes you no longer need is the real fix, and only you know which ones those are.
50.116.60.18is EmailsDoWork's current sending IP. Aninclude:mail.emailsdowork.comfollows us automatically if that IP changes; anip4:term has to be edited by hand, and this guide will show the new address. When your record has lookups to spare, use theinclude:form.
Step 6: DMARC
If your domain has no DMARC record, add a TXT record at _dmarc.<your-domain> to start:
v=DMARC1; p=none;
p=none asks receivers to report but take no action, which is the right place to start. The registration response suggests a version with rua=mailto:dmarc@mail.emailsdowork.com. You can leave the rua= part out, or point it at a mailbox on your own domain that someone reads.
If your domain already has a DMARC record, leave it as it is.
Step 7: Verify
Check that the two records are public:
dig TXT _edw-verify.<your-domain> +short
dig TXT edw1._domainkey.<your-domain> +short
The first should return your edw-verify-… token, and the second a value starting v=DKIM1. Then run the check (or click Verify in the dashboard):
curl -X POST https://mail.emailsdowork.com/domains/<domain-id>/verify \
-H "X-API-Key: <your-api-key>"
On success:
{"id": "<domain-id>", "domain": "<your-domain>", "status": "verified", "verified": true, "reason": null}
On failure, status is failed, verified is false, and reason names the first record it could not find. Fix that record and run the check again.
The check looks for exactly two things: your ownership token at _edw-verify.<your-domain> (an exact match) and a record containing v=DKIM1 at edw1._domainkey.<your-domain>. It does not check SPF or DMARC, so confirm those yourself with dig and the test in Step 8.
Keep both records in place for as long as you send from the domain. If a later check fails, the domain moves to failed and stops counting as verified.
Step 8: Send a test and read the headers
Send one message From your domain to a mailbox you can read, with a one-click unsubscribe URL:
curl -X POST https://mail.emailsdowork.com/email/messages/send \
-H "X-API-Key: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"to": "<your-test-inbox>",
"from_email": "news@<your-domain>",
"subject": "Domain test",
"body_html": "<p>Domain test.</p>",
"unsubscribe_url": "https://<your-domain>/unsubscribe?test=1"
}'
Open the message and view the original source (in Gmail: More, then Show original). In the Authentication-Results header, look for:
dkim=pass header.d=<your-domain>(withheader.s=edw1)dmarc=pass(withheader.from=<your-domain>)spf=passformail.emailsdowork.com. This is expected; it is our bounce domain.
Then find the DKIM-Signature header with d=<your-domain> and check that its h= list includes list-unsubscribe and list-unsubscribe-post. Gmail and Yahoo need both headers covered by the signature for one-click unsubscribe to work.
Sending rules once you're verified
- Send only From addresses on a verified domain. With sender-domain enforcement on, which is the default, a From on any other domain is refused with
403andsender domain not verified for this tenant. That applies to every way of sending: the native API, the SendGrid- and Mandrill-compatible endpoints, campaigns, and the Mailchimp-compatible campaign endpoints. - The match is exact. Mail From
news.<your-domain>needsnews.<your-domain>registered and verified. - EmailsDoWork's own domains are reserved. A From on
emailsdowork.com,mail.emailsdowork.comor any other subdomain gets the same403. - Mail EmailsDoWork sends on your behalf is not affected: double opt-in confirmations still go out from a EmailsDoWork address.
Undo the change
- Delete the two TXT records you added (
_edw-verifyandedw1._domainkey). - Put back the SPF record you saved in Step 2, exactly as it was.
- If you added a DMARC record in Step 6 and want it gone, delete it.
- Optionally remove the domain from EmailsDoWork:
DELETE /domains/<domain-id>(returns204).
Your zone export from Step 2 covers anything else.
Troubleshooting
| Symptom | Likely cause |
|---|---|
409 when registering | The domain is already registered, possibly on another account. |
Ownership TXT not found or mismatched at _edw-verify.<your-domain> | The record is at the wrong name (often the domain typed twice), the token was not copied whole, or DNS has not caught up yet. Check with dig. |
DKIM TXT (v=DKIM1) not found at edw1._domainkey.<your-domain> | Same checks for the DKIM record. Make sure you added it where your nameservers point (Step 1). |
403 sender domain not verified for this tenant on send | The From domain is not verified on your account, is a different subdomain from the one you verified, or is a EmailsDoWork domain (reserved for the platform). |
dkim=none or dkim=fail in the test | The domain was not verified when the message was sent, or the DKIM record was changed after verification. Re-run Step 7. |
dmarc=fail with dkim=pass | The passing signature is for a different domain than your From. Check header.d=. |