Skip to content
Blog

SPF, DKIM and DMARC Explained: Keep Your Business Email Out of Spam

Three DNS records decide whether your business email reaches inboxes or spam folders. Here is what each one does and how to set them up without breaking delivery.

A woman reading email on her laptop
On this page

You can write the perfect proposal and still lose the deal if it lands in the client's spam folder. Today the large mailbox providers check every incoming message for proof that it really came from the domain it claims to come from. That proof comes from three DNS records: SPF, DKIM and DMARC. Set them up correctly and your messages are far more likely to reach inboxes, and far harder for criminals to forge.

Why email needs authentication

Email was designed decades ago without any built-in way to check who sent a message. Anyone could put your address in the "From" line. Spammers and phishers took advantage of that, so mailbox providers now look for technical evidence before trusting a message. Gmail, Outlook and Yahoo all expect bulk senders to authenticate their mail, and messages without that evidence are increasingly filtered or rejected.

For a business, two things are at stake: deliverability, meaning whether your real messages arrive, and reputation, meaning whether someone can impersonate you to your customers.

SPF: who is allowed to send

SPF, the Sender Policy Framework, is a TXT record on your domain that lists the servers permitted to send email using it. A receiving server compares the sending server's address with your list.

A typical SPF record looks like this:

v=spf1 include:_spf.example-provider.com ip4:203.0.113.10 ~all

  • v=spf1 marks the record as SPF.
  • include: adds the servers of a service that sends on your behalf, such as your email host or a newsletter tool.
  • ip4: adds a specific server address.
  • ~all means "anything else is suspicious"; -all means "anything else should fail".

Two rules catch people out. A domain must have only one SPF record; if two services each tell you to add a record, merge them into one. And SPF allows at most ten DNS lookups, so long chains of includes can break it. List only the services you actually use.

If a domain never sends email at all, publish v=spf1 -all. That tells everyone that any message claiming to come from it is forged.

DKIM: a signature on every message

DKIM, DomainKeys Identified Mail, signs each outgoing message with a private key held by your mail server. The matching public key is published in DNS, usually as a TXT record under a name such as default._domainkey.yourdomain.com. The receiving server uses it to check that the message really came from a server holding your key, and that nobody changed the content on the way.

Your email provider generates the keys and gives you the record to publish. On cPanel hosting, the Email Deliverability page shows the DKIM record and can install it for you when your DNS is hosted there. If you use an outside service to send newsletters or invoices, set up DKIM for that service too, so its messages are signed with your domain.

DMARC: the policy that ties them together

SPF and DKIM provide evidence, but they do not tell the receiver what to do when the evidence is missing. DMARC, Domain-based Message Authentication, Reporting and Conformance, fills that gap. It is a TXT record at _dmarc.yourdomain.com that says how strict to be and where to send reports.

v=DMARC1; p=none; rua=mailto:[email protected]

  • p=none means "deliver as normal, but send me reports".
  • p=quarantine means "put failing messages in spam".
  • p=reject means "refuse failing messages".
  • rua is where daily summary reports go.

DMARC also checks alignment: the domain in the visible "From" address must match the domain that passed SPF or DKIM. This is what actually stops someone from forging your address, because a spammer can pass SPF for their own domain but cannot make it align with yours.

A safe order to set things up

  1. List every service that sends as you. Your mailboxes, your website's contact form, your shop's order emails, your billing system, newsletter tools and support desk.
  2. Publish one SPF record that includes each of them.
  3. Turn on DKIM for each service and publish the records they provide.
  4. Add DMARC at p=none with a reporting address.
  5. Read the reports for a few weeks. They show every server sending as your domain and whether it passed. Fix the legitimate services that fail.
  6. Move to p=quarantine, watch for problems, then to p=reject.

Jumping straight to p=reject is the most common mistake. If a forgotten service, such as an old invoicing tool, sends without DKIM, its messages will start disappearing and you may not notice until a customer complains.

Checking your records

You can see what your domain publishes right now with our DNS lookup tool: look up the TXT records for your domain and for _dmarc.yourdomain.com. Send a test message to a mailbox you control on a large provider and view the original message headers; they show whether SPF, DKIM and DMARC passed.

Other habits that help deliverability

  • Send from addresses on your own domain, not a free mailbox, so authentication can align. Our business email plans give each mailbox its own address on your domain.
  • Keep mailing lists clean and include an unsubscribe link in marketing email.
  • Do not send newsletters from the same mailbox you use for customer conversations.
  • Make sure your website's contact form sends through authenticated mail rather than the server's default.

Frequently asked questions

Do I need all three records?

Yes. SPF and DKIM provide the evidence and DMARC sets the policy. Large mailbox providers increasingly expect all three, especially from domains that send in volume.

Can I have two SPF records?

No. Two SPF records make SPF fail. Combine every service into a single record.

Will DMARC stop all spam that uses my name?

It stops messages that forge your exact domain once you move to quarantine or reject. It cannot stop look-alike domains, so also watch for misspellings of your name.

Who reads DMARC reports?

The reports are XML files that are hard to read by hand. Many DNS and security providers offer free dashboards that turn them into simple charts.

My domain never sends email. What should I publish?

Publish an SPF record of v=spf1 -all and a DMARC record with p=reject. That tells receivers to refuse any message that claims to come from the domain.

Written by

telaHosting

Writes for telaHosting on the topics our customers ask about most.

Join the conversation

What is your perspective?

Share a useful experience or ask a question. Keep the discussion constructive and avoid sharing private customer information.

Leave a comment

Your email address is kept private.

New comments are reviewed before publication to keep the discussion useful.