← Back to docs

Domain Verification

Step-by-step DNS setup for SPF, DKIM, DMARC, and bounce routing

Menu

Overview

Before you can send email through EuroMail, you need to verify ownership of your sending domain by adding four DNS records. Three of them (SPF, DKIM, and a return-path MX) live on a dedicated sending subdomain, em.yourdomain.com by default. The fourth (DMARC) lives on your root domain.

The sending subdomain isolates your transactional email reputation from the rest of your domain, and because em.yourdomain.com shares the organizational domain with yourdomain.com, both SPF and DKIM align with your From address under DMARC's default relaxed mode.

Step 1: Add Your Domain

Add your domain through the dashboard or API. EuroMail generates all four DNS records, including a fresh 2048-bit DKIM keypair:

curl -X POST https://api.euromail.dev/v1/domains \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{"domain": "yourdomain.com"}'

Use a domain whose DNS you control. Only Google can publish DNS records on gmail.com, so a mailbox provider's domain (Gmail, Outlook, Proton, iCloud and similar), or any subdomain of one, is refused: the dashboard says why, and the API answers 422.

The response includes every record you need to configure. When you add a domain through the dashboard, EuroMail also detects your DNS provider from your nameservers and runs a first verification check in the background; when adding via the API, trigger the first check yourself once your records are published (see Verifying Your Records).

Step 2: Configure SPF

SPF (Sender Policy Framework) tells receiving mail servers which IP addresses are authorized to send email for a domain. SPF checks the envelope sender, and EuroMail sets the envelope sender on your sending subdomain, so the record goes on em.yourdomain.com, not your root domain:

em.yourdomain.com.  TXT  "v=spf1 include:spf.euromail.dev ~all"

Because the record lives on a dedicated subdomain, it doesn't interact with any SPF record you already have on your root domain for other services. Your root record stays as it is.

Important: A hostname can only have one SPF record. If you already publish a TXT record starting with v=spf1 on em.yourdomain.com (unusual, but possible), merge the include: into it rather than adding a second record.

Step 3: Configure DKIM

DKIM (DomainKeys Identified Mail) allows receiving servers to verify that emails were authorized by your domain and not modified in transit. EuroMail signs with d=em.yourdomain.com, so the public key is published under the sending subdomain:

euromail._domainkey.em.yourdomain.com.  TXT  "v=DKIM1; k=rsa; p=MIIBIj..."

The full public key value is provided in the dashboard and API response when you add your domain. Copy the entire value exactly as shown. It is a base64-encoded 2048-bit RSA public key.

Step 4: Configure the Return-Path MX

Each email is sent with a unique envelope sender like bounce+<message-id>@em.yourdomain.com, so bounces come back carrying the ID of exactly which message failed. For those bounces to reach EuroMail's processing, your sending subdomain needs an MX record pointing at our bounce server:

em.yourdomain.com.  MX  10  bounce.euromail.dev.

Until this record verifies, EuroMail falls back to sending from its own bounce domain. Mail still delivers and DKIM still aligns, but SPF alignment for your domain only kicks in once the return-path is verified, so don't skip this record.

Step 5: Configure DMARC

DMARC (Domain-based Message Authentication, Reporting, and Conformance) tells receiving servers what to do with emails that fail SPF or DKIM alignment. Unlike the other records, it belongs on your root domain, because DMARC applies to the domain in the From: header:

_dmarc.yourdomain.com.  TXT  "v=DMARC1; p=none; rua=mailto:[email protected]"

This is the record EuroMail recommends to start with: p=none collects data without affecting delivery, and the rua address feeds DMARC Monitoring in your dashboard so you can watch your alignment rate. Once the reports show your legitimate mail aligning, tighten the policy to p=quarantine and then p=reject — the rollout is covered in the DMARC Monitoring guide.

If you already have a DMARC record, keep your existing policy and append EuroMail's reporting address to the rua tag with a comma.

Changing the Sending Subdomain

em is the default, but the sending subdomain is yours to choose (send, mg, ...). Change it via the dashboard or API:

curl -X PUT https://api.euromail.dev/v1/domains/{domain_id}/sending-subdomain \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{"sending_subdomain": "mail"}'

The SPF, DKIM, and return-path records regenerate for the new subdomain and need to be published again. The DMARC record is unaffected, since it stays on the root domain. Some prefixes with established meanings (mail, bounce, postmaster, abuse, ...) are reserved and can't be used for sending.

Vanity Tracking Domain (Optional)

By default, tracking links and unsubscribe pages in your emails use api.euromail.dev. You can brand these with your own subdomain for a white-label experience.

Add a CNAME record pointing your chosen subdomain to EuroMail's tracking server. The tracking subdomain must be different from your sending subdomain — a hostname can't hold a CNAME alongside the MX and TXT records that live on em.yourdomain.com:

track.yourdomain.com.  CNAME  tracking.euromail.dev.

Then configure it via the dashboard or API:

curl -X PUT https://api.euromail.dev/v1/domains/{domain_id}/tracking-domain \
  -H "Authorization: Bearer em_live_..." \
  -H "Content-Type: application/json" \
  -d '{"tracking_domain": "track.yourdomain.com"}'

After adding the DNS record, verify the CNAME:

curl -X POST https://api.euromail.dev/v1/domains/{domain_id}/verify-tracking \
  -H "Authorization: Bearer em_live_..."

Once verified, all tracking pixels, click tracking links, and unsubscribe pages will use https://track.yourdomain.com. TLS certificates are provisioned automatically.

Verifying Your Records

Trigger a verification check from the domain page in the dashboard or via the API whenever you've published or changed records (dashboard-added domains also get one automatic check right after creation):

curl -X POST https://api.euromail.dev/v1/domains/{domain_id}/verify \
  -H "Authorization: Bearer em_live_..."

The response reports each record separately — SPF, DKIM, DMARC, and return-path — with a detail message explaining any failure.

The dmarc entry also has an alignment object. It says whether mail we send for your domain can pass the DMARC policy you publish.

We sign and send from your sending subdomain, so strict alignment matters. With adkim=s a DKIM signature only counts if it comes from exactly your From domain, and aspf=s asks the same of the return path. DMARC passes if either one aligns and verifies. A record that is strict on both can never pass, while one that is strict on only one still passes through the other. If mail can never pass and your policy is p=quarantine or p=reject, Gmail and other receivers will junk or reject it. alignment.severity is then blocking, and alignment.suggested_record holds your DMARC record with the strict tag relaxed and our report address added. Publish it at alignment.record_host. Relaxed alignment lets a signature from any subdomain of your domain count for your From address.

alignment.severity is unknown when the DMARC lookup failed, and conflict when a name publishes more than one DMARC record. Receivers ignore DMARC in that case until you delete all but one. The domain page in the dashboard shows the same result.

Listing, Inspecting and Removing Domains

# All domains on the account (paged; per_page defaults to 25, at most 100)
curl "https://api.euromail.dev/v1/domains?page=1&per_page=25" \
  -H "Authorization: Bearer em_live_..."

# One domain, with its DNS records and verification state
curl https://api.euromail.dev/v1/domains/{domain_id} \
  -H "Authorization: Bearer em_live_..."

# Remove a domain
curl -X DELETE https://api.euromail.dev/v1/domains/{domain_id} \
  -H "Authorization: Bearer em_live_..."

A delete returns 204 No Content. After that you can no longer send from the domain. All domain calls need the domains:manage scope.

Dashboard Verification Status

The dashboard shows the verification status of each DNS record individually:

  • Verified. Record found and correctly configured
  • Pending. Record not yet verified, either because it hasn't been detected (DNS propagation may still be in progress) or because the last check failed — in which case the failure detail is shown inline under the badge

DNS monitoring

Verification isn't a one-time check. Once a domain is verified, EuroMail re-checks its DKIM and return-path records every hour, and its SPF record if it was verified. A registrar migration, a DNS provider switch or a zone cleanup can drop one of them weeks after setup, and without the check the first sign would be mail failing authentication.

A record counts as drifted only when DNS answers definitively. Either the record exists but no longer matches (a different DKIM key, an SPF record without include:spf.euromail.dev, a return-path MX pointing somewhere else), or DNS confirms the name or record type doesn't exist. A lookup that fails or times out tells us nothing about your records, so it never raises a warning and never clears one. DMARC isn't checked here, because it doesn't affect whether your domain stays verified.

When a record drifts:

  • The domain list and the domain page show which records stopped matching and when we first noticed.
  • The account owner gets one email with the domain, the records, what to publish again and a link to the domain page. One email per episode, not one an hour.
  • The domain stays verified and sending isn't blocked. The warning gives you time to fix DNS before receivers start rejecting mail.

The warning clears at the next hourly check once the records match again, or right away when you press Verify DNS on the domain page. If the records break again later, you get a new email. The API's domain object carries the same state in dns_checked_at, dns_drift_detected_at and dns_drift_records (any of spf, dkim, return_path).

Troubleshooting

DNS Propagation Delays

DNS changes can take up to 48 hours to propagate, though most providers update within 15 minutes. If your records are not detected after an hour, verify them with a DNS lookup tool and re-run the verification check.

Records on the Wrong Host

The most common setup mistake is publishing the SPF or DKIM record on the root domain instead of the sending subdomain. SPF goes on em.yourdomain.com, DKIM on euromail._domainkey.em.yourdomain.com. Only DMARC goes on the root (_dmarc.yourdomain.com).

SPF Lookup Limit

SPF evaluation allows at most 10 DNS-querying mechanisms, counted recursively through every include:. The verification response reports your record's lookup count. Since EuroMail's SPF record lives on a dedicated subdomain, hitting the limit there is rare — it usually means other services were merged into the same record.

DKIM Key Too Long

Some DNS providers split long TXT records into multiple strings. Ensure your provider supports TXT records of at least 512 characters, or use the split-string format if required.

Send your first email in about 90 seconds

The free tier includes 3,000 emails a month. Email storage and AI processing in Finland, with a DPA on every plan.

Create free account See live delivery data