My account Get a quote
Security

Business Email: SPF, DKIM and DMARC to Stay Out of Spam

Learn what SPF, DKIM and DMARC records do for business email, how to set them up correctly and how to test them so your messages stop landing in spam.

· 6 min read
Business Email: SPF, DKIM and DMARC to Stay Out of Spam

Business email means corresponding from addresses linked to your own domain (e.g. info@yourcompany.com). To keep these messages from landing in the spam folder of the recipient, you need to add SPF, DKIM and DMARC records to your domain. Together, the three records give the receiving server proof that “this message was really sent from a server authorized by the domain owner.” In this guide you will learn step by step what each record does, how it is written and how to test that it works correctly.

Why business email differs from a free address

A business that corresponds from a free address earns less trust in the eyes of its customers. Writing from your own domain brings brand recognition and easier management: when an employee leaves, you close their account and hand the address over to a new employee. However, because the domain is yours, others may also try to send mail on your behalf. For this reason, receiving servers check incoming mail and treat mail whose identity cannot be verified with suspicion.

A common complaint with a newly set up email system is this: you sent a proposal, the customer says “it didn't arrive,” and the message is sitting in the spam folder. Most of the time, the cause is missing verification records on the DNS side. For general information about domain management, you can take a look at our article what is a domain name.

What SPF is and how to write it

SPF (Sender Policy Framework) is a DNS TXT record that lists the servers authorized to send mail on behalf of your domain. The receiving server looks at the address the message came from and checks whether that sending server is on your list.

Example SPF record

The record is added as a TXT entry at the root level of your domain:

v=spf1 include:_spf.mail-provider.example ~all

  • v=spf1: indicates that the record is an SPF record.
  • include:: includes the list of authorized servers published by your email provider. Take the correct value from your provider's help page.
  • ~all: means “soft fail” (mark as suspicious) for servers that are not on the list. -all is stricter. It is safe to start with ~all and tighten it once you are sure there are no problems.

Important rules: a domain may have only one SPF record. Instead of adding a second record, add a new include to the existing one. Also, the number of DNS lookups made during SPF verification is limited (10 lookups in the standard). If you add too many services, the record may be treated as invalid.

What DKIM is and how it works

DKIM (DomainKeys Identified Mail) makes your sending server add a digital signature to every email it sends. The sending server signs the message with its private key, and the recipient verifies the signature with the public key you publish in DNS. If the signature is valid, the message was not altered in transit and came from the domain owner.

In practice, DKIM setup goes like this: your email provider enables DKIM in its panel and gives you a “selector” name and a public key value. You add this information to DNS as a TXT record (some providers use a CNAME instead) in the form selector._domainkey.yourcompany.com. After the record is added, you may need to press a “verify” button in the provider's panel.

If more than one service (business email, newsletter tool, invoicing system) sends mail on behalf of your domain, each one needs its own DKIM record. They cannot replace one another.

What DMARC is and its policy levels

DMARC brings the SPF and DKIM results together and tells the recipient what to do if verification fails. It also lets recipients send you reports, so you can see who is sending mail on behalf of your domain. For DMARC to pass, at least one of SPF or DKIM must pass and be aligned with the sending domain.

The record is added as a TXT entry at _dmarc.yourcompany.com. A safe starting example:

v=DMARC1; p=none; rua=mailto:dmarc@yourcompany.com

The policy (p=) has three levels:

  • none: only monitor and receive reports; do not touch the mail. This is the starting point.
  • quarantine: send mail that fails verification to the spam folder.
  • reject: reject mail that fails verification completely. This is the strongest protection.

The right approach is to monitor reports with none for a few weeks, make sure all legitimate senders are verified, and then move to quarantine and finally reject. If you rush and set reject right away, mail from a forgotten newsletter service may be rejected.

Comparing the three records

RecordWhat it doesDNS locationWhat happens if it is missing
SPFLists the authorized sending serversDomain root (TXT)Mail is considered suspicious and spam risk increases
DKIMDigitally signs the mailselector._domainkey (TXT/CNAME)It cannot be proven that the content was not changed
DMARCSets the failure policy and reporting_dmarc (TXT)No visibility into or protection against spoofed sending

Step-by-step setup

  1. Open the DNS setup documentation of your email provider (hosting panel or cloud email service) and note the SPF and DKIM values it requires.
  2. Find out where your domain's DNS is managed (domain registrar or DNS service).
  3. Review the existing TXT records. If an SPF record already exists, do not add a new one; edit the existing record.
  4. Add or update the SPF record, including every service that sends mail on behalf of your domain with include.
  5. Enable DKIM from the provider's panel and add the record it gives you to DNS.
  6. Add the DMARC record with p=none and a reporting address.
  7. Wait for the DNS changes to propagate, then send test mail to yourself and to addresses at different providers.
  8. In the mail headers, confirm that the SPF, DKIM and DMARC results show “pass.”
  9. After monitoring the reports for a few weeks, tighten the DMARC policy gradually.

Common mistakes

  • Multiple SPF records: The records conflict and verification fails. Merge them into a single record.
  • Forgetting third-party services: Tools such as newsletter, CRM or invoicing systems also send mail on your behalf, and they must be added to SPF and DKIM.
  • A strict policy right away: A reject policy without testing can cause legitimate mail to be lost.
  • Record in the wrong place: The DMARC record is written to the _dmarc subdomain, not the root domain.
  • Not monitoring the reporting address: Reports arrive, but if nobody reviews them, the benefit of DMARC drops.
  • Missing the domain renewal: If the domain expires, all records and mail flow stop.

Additional tips to avoid spam

Verification records are necessary, but they are not enough on their own. Sender reputation matters too. For bulk sending, write only to people who gave permission, add an unsubscribe link, and remove bounced addresses from your list. Avoid exaggerated promises and fully capitalized phrases in subject lines. Where possible, send newsletters from a separate subdomain rather than your daily correspondence, so that if one has a problem, the other is not affected.

Also check from time to time whether the IP address of the server you send from appears on any blocklist. On shared servers, another customer's behavior can affect IP reputation; in that case, you need to contact your provider or use a dedicated IP. For the differences between hosting options in this respect, see our web hosting types guide.

How to test verification

After adding the records, do not leave whether they work to guesswork. Three methods will do the job:

  • Header inspection: Open the “show original” or “show headers” option for mail you sent to your own address. Look for spf=pass, dkim=pass and dmarc=pass.
  • Sending to different providers: Send the test mail to addresses at several different email providers; the result can vary from one provider to another.
  • DNS query: Check that the records are published correctly, using a DNS lookup tool or a TXT query from the command line. Extra spaces, missing quotes and wrong subdomain errors are caught this way in particular.

If a result shows “fail,” first wait for DNS propagation. Then check the spelling of the record and whether the sending server is really on your SPF list.

What to look for when choosing an email provider

When choosing a business email provider, look not only at mailbox size but also at verification support. A good provider clearly gives you the SPF include value and the DKIM key along with its setup documentation; helps you make sense of DMARC reports; supports two-step verification; and offers backups. Mailbox capacity, the attachment size limit and alias support also make a difference in daily use.

Do not forget the mail that your own software sends from your server, such as contact form or order notifications. These messages often leave through the server's default mail handler and go out unsigned. Sending them instead through an authenticated SMTP account is better both for the DKIM signature and for deliverability. Website forms whose mail never arrives are a common problem, and it is often caused by this setting.

Conclusion

SPF specifies the authorized servers, DKIM provides the signature, and DMARC provides the policy and reporting. When all three are set up together, the chances of your business mail reaching the inbox rise noticeably, and it becomes harder for your domain to be used in spoofed sending. If you would like help configuring your business email and DNS settings with confidence, you can contact us.

Frequently asked questions

Do I have to set up SPF, DKIM and DMARC all together?

It is not mandatory, but it is recommended. SPF and DKIM provide verification, while DMARC sets a policy based on their results and provides reports. The three together give the best result.

Can I set the DMARC policy to reject right away?

This is not recommended. First monitor the reports with p=none; once all legitimate senders are verified, move to quarantine and then to reject.

How long do DNS changes take to take effect?

Records usually propagate quickly, but due to caching it can take several hours in some cases. Wait a little before sending the test mail.

Can a domain have two SPF records?

No. A domain should have only one SPF record. Add new services as an include in the existing record.

What should I do if my mail still lands in spam after setup?

Check your sender reputation, content quality and whether the IP address is on a blocklist, and review the SPF, DKIM and DMARC results in the header information.

Need help with this?

Hosting, security, backups, SSL certificates and version upgrades.

See the serviceGet a quote

Related posts

All →