Hosting & Migration 6 min read

SPF, DKIM and DMARC: fixing email deliverability

SPF, DKIM and DMARC explained: how email authentication works, setting up each record, combining senders, DMARC policies and reports, and fixing emails that go to spam.

Usman Muhammad UsmanUpdated October 13, 2026
SPF, DKIM and DMARC: fixing email deliverability

If your business emails or website notifications land in spam, or bounce entirely, email authentication is often the cause. SPF, DKIM and DMARC are DNS records that prove your emails are genuinely from your domain. Major mailbox providers now require them for bulk senders, and they help everyone’s emails reach the inbox. Here is how they work and how I set them up.

Why authentication matters

Email was designed without built-in proof of who sent a message, which makes spoofing easy. Mailbox providers such as Gmail, Outlook and Yahoo use SPF, DKIM and DMARC to decide whether a message is genuinely from the domain it claims and whether to trust it.

In 2024, Google and Yahoo began requiring authentication for bulk senders, and Microsoft introduced similar requirements for Outlook. Even small senders benefit, because authenticated mail is more likely to reach the inbox.

SPF: who may send

SPF, Sender Policy Framework, is a TXT record listing the servers and services allowed to send email for your domain. Receiving servers check whether the sending server is on the list.

A typical record starts with v=spf1, includes your email provider and other senders, and ends with a rule such as ~all or -all. For example, Google Workspace uses include:_spf.google.com.

Email authentication
RecordChecksWhere
SPFAllowed sending serversTXT at root
DKIMMessage signatureTXT or CNAME per sender
DMARCPolicy and reportsTXT at _dmarc

One SPF record only

A domain can have only one SPF record. If you use several services, such as Microsoft 365, a website SMTP service and an email marketing platform, combine them into a single record with multiple include statements.

SPF also has a limit of ten DNS lookups. Too many includes can break it. If you hit the limit, remove unused services or use services that send with their own domain for bounces.

DKIM: signing messages

DKIM, DomainKeys Identified Mail, adds a digital signature to each outgoing email using a private key held by the sender. The matching public key is published in your DNS. Receiving servers check the signature to confirm the message is from your domain and was not altered.

Each sending service has its own DKIM setup. In Google Workspace and Microsoft 365, you generate a key in the admin console, add the DNS record and then enable signing.

DKIM for every sender

Set up DKIM for every service that sends email using your domain: your mailbox provider, transactional email service used by your website, email marketing platform, CRM and help desk tools. Each provides DNS records, often CNAMEs.

Unsigned messages from any of these services may fail DMARC checks once you enforce a policy.

DMARC: the policy

DMARC, Domain-based Message Authentication, Reporting and Conformance, tells receiving servers what to do if a message fails SPF and DKIM alignment checks, and where to send reports. It is a TXT record at _dmarc.yourdomain.com.

The policy can be p=none, which only monitors, p=quarantine, which sends failing messages to spam, or p=reject, which blocks them. Alignment means the domain in the From address matches the domain authenticated by SPF or DKIM.

Start with monitoring

Begin with p=none and a reporting address using the rua tag. Reports, sent daily by mailbox providers, show which servers send email using your domain and whether they pass authentication. They are XML files, so use a DMARC reporting service to read them easily.

Review reports for a few weeks to find legitimate senders you forgot, such as a booking system or invoicing tool, and set up SPF and DKIM for them.

Move to enforcement

Once all legitimate senders pass, change the policy to quarantine, then reject. Enforcement protects your domain from being spoofed in phishing emails, which protects your customers and reputation.

Move gradually, using the pct tag to apply the policy to a percentage of messages if you want to be cautious. Keep monitoring reports after enforcement.

Website emails

WordPress sends notifications through the web server by default, which is usually not covered by SPF or DKIM and often lands in spam. Use an SMTP plugin connected to your email provider or a transactional service, and include that service in SPF and DKIM.

See fixing WordPress email with SMTP. For Shopify, verify your sender email domain and add the DNS records Shopify provides.

Other deliverability factors

Authentication is necessary but not the only factor. Spam complaints, sending to invalid addresses, sudden volume spikes, poor content and missing unsubscribe links all affect deliverability. Bulk senders must offer easy unsubscribes and keep spam complaint rates low.

Keep lists clean, send to people who opted in and monitor complaint rates in tools such as Google Postmaster Tools.

Testing your setup

Send a test email to a Gmail address and view the original message to see SPF, DKIM and DMARC results. Online tools such as mail testers check records and score your email. DNS lookup tools show your published records.

Test after every change to DNS or sending services. See DNS records explained.

Common mistakes

Common mistakes include multiple SPF records, missing includes for services, forgetting DKIM for marketing tools, enforcing DMARC before checking reports and typos in DNS values. Another is setting up records at the wrong DNS provider when nameservers point elsewhere.

Keep a list of every service that sends email for your domain and check it when adding new tools.

Getting help

I set up SPF, DKIM, DMARC and website email delivery as part of my hosting and migration service. For mailbox setup, see setting up business email.

For phishing protection, read protecting your business from phishing and domain spoofing.

Key takeaways

  • SPF lists senders, DKIM signs messages and DMARC sets the policy.
  • Combine all senders into one SPF record within the lookup limit.
  • Set up DKIM for every service that sends email for your domain.
  • Start DMARC with monitoring, then move to quarantine or reject.

Frequently asked questions

Do small businesses need DMARC?

Yes. It protects your domain from spoofing and improves deliverability.

Why are my emails going to spam?

Missing or broken SPF, DKIM or DMARC is a common cause, along with content and reputation.

Can I have two SPF records?

No. Combine them into one record.

What DMARC policy should I use?

Start with p=none to monitor, then move to quarantine and reject once senders pass.

How do I read DMARC reports?

Use a DMARC reporting service that turns XML reports into readable summaries.

Do I need DKIM for my website emails?

Yes, through your SMTP or transactional email service.

How long do DNS changes take to work?

Usually minutes to a few hours, depending on TTL.

Free website audit

Get a free audit of your website

Tell me your URL and I'll send a short, prioritized list of the speed, SEO and security fixes that will make the biggest difference.

  • No obligation, no sales call
  • 5.0 rating on Google and Upwork
  • Reply within one business day
Written by Muhammad UsmanWeb Development Team Lead with 5+ years building WordPress, WooCommerce, Shopify and Wix websites. Experience · Certificates About me

More on Hosting & Migration

All Hosting & Migration articles

Have a project in mind?

Tell me what you're building and I'll reply with next steps and an estimate.