Suped

How to set up DMARC/DKIM/SPF for DomainNameSanity

Published 22 Nov 2026
Updated 22 Nov 2026
11 min read
Summarize with
DomainNameSanity SPF, DKIM and DMARC setup
For DomainNameSanity's Legacy Hosted Email, authorize _spf.hostedemail.com in SPF, publish the k1 and k2 DKIM CNAMEs, and add a DMARC TXT record at _dmarc. I verify authentication on an outgoing message before enforcing DMARC.
Confirm your service first. DomainNameSanity labels those DNS values "Legacy Hosted Email" in its public support article "Configure DNS Records for Business Email Hosting". Its "App Configuration for Hosted E-Mail Accounts" article separately identifies MXLogin accounts. DirectAdmin hosting email also needs its own server-specific settings.

Add your domain

I start with the actual email service and a working mailbox. Registering a domain alone does not configure authenticated outgoing email.
  1. Open your service. Sign in to DomainNameSanity, open Services > My Services, and select the relevant email or hosting service. Check whether its name identifies Legacy Hosted Email, MXLogin or DirectAdmin.
  2. Provision the domain. Confirm your sending domain and mailboxes are provisioned. For a missing hosted email domain, ask DomainNameSanity support to add it before changing DNS; its public legacy instructions require provisioning first.
  3. Confirm access. Sign in to a mailbox with its full email address and mailbox password. For MXLogin accounts, open the service's Client Configuration page for the account-specific server settings.
  4. Locate DNS. Identify the authoritative nameservers with dig NS example.com +short. Edit records at that DNS host. Complete any ownership challenge supplied for your account using its exact name and value.
A successful mailbox login confirms account access. Ownership verification, where requested, is a separate check; use the challenge supplied by DomainNameSanity.
Use the client configuration for your service when testing SMTP. The public legacy settings specify mail.hostedemail.com on port 465 with SSL; MXLogin accounts use the settings shown in their own service.
Generated illustration of DomainNameSanity's published email client settings.
Generated illustration of DomainNameSanity's published email client settings.
If you are migrating incoming email, provision the destination mailboxes before changing MX. SPF, DKIM and DMARC changes alone do not require an MX migration.

Set up SPF

DomainNameSanity supports Return-Path alignment. SPF contributes to DMARC when the authenticated envelope sender domain matches your visible From domain under your DMARC alignment settings.
  1. Inspect existing SPF. Look up TXT records for the envelope sender domain. Keep exactly one record beginning v=spf1 at each name; unrelated TXT records can remain.
  2. Authorize legacy sending. For confirmed Legacy Hosted Email, add include:_spf.hostedemail.com before the existing terminal all mechanism. Preserve other legitimate senders and the existing all qualifier. Use the example below only when creating a new legacy-only SPF record.
  3. Match your backend. For MXLogin or DirectAdmin email, use the SPF value supplied for that service. Ask support for its outbound authorization if the account does not display it.
  4. Check the lookup budget. Keep the evaluated DNS-querying terms within SPF's limit of 10, including nested includes. SPF records do not automatically apply to subdomains.
New SPF record for Legacy Hosted Email onlydns
example.com. 3600 IN TXT "v=spf1 include:_spf.hostedemail.com ~all"
Replace example.com with your domain. In a DNS form, the name is usually @ for the root domain, and the value is the text inside the quotes. Keep the form's normal TTL unless you have a reason to change it.
Run the SPF check below against the actual Return-Path domain. A valid SPF record at the From domain does not repair a message that uses a different envelope sender domain.

SPF checker

Find SPF syntax issues, lookup limits, and weak records.

?/16tests passed
After the DNS check passes, send through DomainNameSanity and inspect the receiver's SPF result. If the Return-Path still uses a provider-owned domain, ask support to confirm your account's matching envelope sender configuration.

Set up DKIM

I check both DNS publication and server-side signing. Publishing a key does not prove the service is signing messages with your domain.
  1. Publish both selectors. For Legacy Hosted Email, create the two CNAME records below, substituting your own domain in both the record names and targets.
  2. Use account-specific keys. For MXLogin accounts, request the exact DKIM selector, record type and value from DomainNameSanity. For DirectAdmin email, open Email Manager > Email Accounts, use Enable DKIM if available, and copy the generated public DNS record.
  3. Publish authoritative DNS. If DNS is hosted elsewhere, copy the supplied records there. A DKIM CNAME name cannot also contain a TXT record. Keep CNAME records unproxied.
  4. Confirm signing. Send a new message and check DKIM-Signature. Its d= domain must match your From domain under the configured alignment mode, and the receiver must report dkim=pass. Ask support to enable signing if the control is unavailable.
Legacy DKIM CNAME recordsdns
k1._domainkey.example.com. IN CNAME k1.example.com.dkim.hostedemail.link. k2._domainkey.example.com. IN CNAME k2.example.com.dkim.hostedemail.link.
If the DNS editor appends your domain, enter k1._domainkey and k2._domainkey as the names. Enter each target as a complete hostname; check the saved result for an accidentally duplicated domain.
These CNAMEs delegate public-key publication to the hosted service. Keep both published for selector rotation. For account-generated TXT keys, copy the complete public value and keep the private key on the signing system.
Generated illustration of DomainNameSanity's published legacy DKIM instructions.
Generated illustration of DomainNameSanity's published legacy DKIM instructions.
If DNS resolves but DKIM is missing or fails, check the selector actually used in the message. Compare its s= and d= values with the published record, then ask DomainNameSanity to investigate signing or key rotation.

Set up DMARC

For a domain without an enforcement policy, start with p=none and aggregate reporting. If your domain already uses p=quarantine or p=reject, keep that policy while fixing DomainNameSanity authentication.
  1. Check the existing policy. Query TXT at _dmarc.example.com. Edit the existing DMARC record rather than creating a second one at the same name.
  2. Publish the TXT value. Use _dmarc as the name if your DNS editor appends the domain. For a new monitoring policy, enter the exact example below after replacing its report address.
  3. Use a real report destination. Replace dmarc@example.com with a mailbox or reporting destination you control. Keep existing valid report recipients. An external reporting destination needs the required authorization DNS record at the destination.
  4. Keep default matching. Leave aspf and adkim unset for relaxed alignment unless your existing policy intentionally requires strict matching. Either passing SPF with matching identity or passing DKIM with matching identity is sufficient for DMARC.
New DMARC monitoring policydns
v=DMARC1; p=none; rua=mailto:dmarc@example.com
Build the TXT value with our DMARC record generator. Publish it at _dmarc, replacing the example reporting address before saving.
Preserve existing enforcement
Do not replace an existing quarantine or reject policy with this monitoring example. Preserve its enforcement and review other existing tags before editing the record.
A p=none policy requests no DMARC-based rejection or quarantine. The rua address collects aggregate XML reports; it does not change DomainNameSanity's outgoing server settings.
Use the check below to confirm that your published policy is readable and has the intended reporting address. Report arrival depends on participating receivers and their reporting schedules.

DMARC checker

Look up a domain's DMARC record and catch policy issues.

?/7tests passed
A passing DNS check confirms the policy's publication. The next check is a real outgoing message, because DMARC evaluates the identities authenticated on each email.

Verify and troubleshoot

I send a fresh test message after DNS changes and repeat the test through every active route, including webmail and applications using authenticated SMTP.
  1. Inspect receiver results. Read Authentication-Results added by the receiving system. Check spf=pass, dkim=pass and dmarc=pass, plus the associated domains; pass labels alone do not establish DMARC alignment.
  2. Check the envelope sender. Compare smtp.mailfrom or Return-Path with the visible From domain. For normal DomainNameSanity mailbox sending, investigate unexpected provider-domain Return-Paths with support.
  3. Check the signature. Compare header.d with the From domain and use the actual selector to query its public key. An intact, matching DKIM signature can preserve DMARC through forwarding when SPF fails.
  4. Retest the same route. After correcting DNS or signing, wait for the previous record's TTL or negative cache to expire, then send a new message. Keep the test headers and timestamp for support.
The email tester is the quickest end-to-end check: send a message from your DomainNameSanity mailbox to the test address it provides, then open the diagnosis.
Use the same From address and sending application as production. This tests the actual message path, including the signing domain and Return-Path, instead of only checking published DNS.

Email tester

Send a real email to this address. Suped shows a results button when the test is ready.

?/43tests passed
Repeat the test after each correction. A message sent before a DNS or server change retains its original signature and receiver results.
For the legacy setup, these commands check record publication and resolve each DKIM target to its public key. Substitute the actual domain and selectors for other service types.
Check the legacy DNS chainbash
dig TXT example.com +short dig CNAME k1._domainkey.example.com +short dig CNAME k2._domainkey.example.com +short dig TXT k1.example.com.dkim.hostedemail.link +short dig TXT k2.example.com.dkim.hostedemail.link +short dig TXT _dmarc.example.com +short

Result

Likely check

Action

SPF permerror
Duplicates or lookups
Merge SPF; recount
DKIM none
Outgoing signer
Enable domain signing
DKIM fail
Selector or message
Verify key and route
DMARC fail
Identity mismatch
Check From identities
No reports
rua or reporting
Check address and traffic
Start with the failure reported by the receiving system.
An SPF alignment error is compatible with DMARC passing through correctly authenticated DKIM. For a sender without a matching Return-Path option, publishing SPF at your From domain does not fix that mismatch; maintain passing DKIM with a matching domain.

Get alerted when it breaks

Our product, Suped, provides ongoing DMARC monitoring so DomainNameSanity authentication failures are investigated after setup. Its issue detection, repair steps and DNS history connect reported failures with configuration changes.
  1. Verify the source. Review the DomainNameSanity sending traffic and mark it verified only after confirming it is authorized. Check the sending IP and authenticated domains instead of relying only on a source name.
  2. Enable notifications. In Suped's notification settings, enable Issues detected and Sending sources need verification. Enable DMARC summary emails for periodic review.
  3. Investigate the evidence. Open the affected source and drill into SPF, DKIM and DMARC results. Filter the data by source, reporter or IP to isolate the failing route.
  4. Connect changes to failures. Compare DNS history with the failure period. Send a fresh test after fixing the record or asking DomainNameSanity to repair signing.
Alerts follow available evidence
Suped sends notifications when it detects issues in available data. DMARC aggregate reports arrive on receiver schedules, commonly daily, so these alerts are not a live feed of every SMTP delivery.
When escalating to DomainNameSanity, include the sending domain, affected mailbox, timestamp and full headers from a failed test. Identify the failing selector or envelope sender domain so support can check the relevant service.

Secure your domain with p=reject

I move to p=reject after legitimate sending routes pass DMARC across a full business sending cycle. One successful DomainNameSanity test does not cover other services using the same From domain.
  1. Inventory legitimate senders. Use Suped's source view to confirm mailbox email and every other authorized application. Include infrequent mail such as invoices and password resets.
  2. Resolve authorized failures. Fix missing DKIM, incorrect envelope sender domains and SPF errors before enforcement. Review forwarding separately and avoid authorizing unknown IPs just to increase the pass rate.
  3. Stage the policy. For a domain starting at none, move to quarantine, observe legitimate traffic, then change to reject. Review subdomain policy inheritance and any explicit subdomain DMARC records.
  4. Keep monitoring. Retain reporting and Suped issue notifications after reject. Recheck authentication whenever DomainNameSanity changes signing keys or an application changes its sending route.
Continue investigating
Authorized sources still fail DMARC, senders remain unidentified, or routine mail has not been observed. Resolve those gaps before increasing enforcement.
Ready for reject
Authorized routes have passing authentication with matching identities, subdomain policies are reviewed, and issue notifications have an owner.
Our Hosted DMARC product lets teams manage policy through Suped's dashboard after its DNS setup is complete. Use the source evidence and issue workflow to decide when to advance enforcement.
Reject policy after legitimate senders are verifieddns
v=DMARC1; p=reject; rua=mailto:dmarc@example.com
Keep your real report destination and any intentional existing tags when updating the policy. A reject policy asks receivers to reject DMARC failures; receivers retain control of their final handling decisions.

Frequency asked questions

DomainNameSanity's Legacy Hosted Email uses hostedemail.com infrastructure. That suffix is shared infrastructure and does not uniquely identify DomainNameSanity as the reseller. Confirm a source using the sending IP, full message headers and authenticated domains before authorizing it.

No. Keep one SPF TXT record at each envelope sender domain. For Legacy Hosted Email, merge include:_spf.hostedemail.com into the existing record before its terminal all mechanism, preserving other authorized senders and staying within the 10-term DNS lookup limit.

Yes. DMARC passes when DKIM verifies and its signing domain matches the From domain under the configured alignment mode. A sender without a matching Return-Path option can rely on that DKIM result. DomainNameSanity supports Return-Path alignment, so investigate an unexpected mismatch on its direct mailbox traffic.

DNS publication and outgoing signing are separate. Confirm that you are sending through the intended DomainNameSanity service and that signing is enabled for your domain. Ask support to check the signer when a fresh outgoing message has no DKIM-Signature header.

No. MX controls incoming mail routing. SPF authorizes envelope sender infrastructure, DKIM verifies signatures, and DMARC checks authenticated identities against the From domain. Change MX only when moving incoming email to a different service, after the destination mailboxes are provisioned.
DMARC monitoring

Start monitoring your DMARC reports today

Suped DMARC platform dashboard
What you'll get with Suped
Real-time DMARC report monitoring and analysis
Automated alerts for authentication failures
Clear recommendations to improve email deliverability
Protection against phishing and domain spoofing