Website & Development
How to Set Up SPF, DKIM and DMARC: Get Your Form and Business Emails Delivered
Copy for AI
SPF, DKIM and DMARC prove your emails really come from your domain.
They’re three small DNS records. Receiving mail servers, such as those of Gmail and Outlook, check them before they trust a message.
If your business emails or website lead notifications land in spam, missing or incorrect email authentication is almost always the cause.
The verdict: set up all three, start DMARC on monitoring, and test your form notifications first. That’s where the leads quietly leak away.
Below: what each record does, why it matters for your lead flow, and how to set it up without being a mail expert.
Why do my business emails and lead notifications end up in spam?
Because the receiving server can’t verify that the email really comes from you.
Mail servers trust nothing by default. Every incoming email is weighed against countless signals, and authentication is one of the heaviest.
An email from a domain without SPF, DKIM and DMARC looks like a letter with no sender and no stamp. Maybe genuine, maybe not, so to be safe it goes to spam.
The leak you don’t see: form notifications
The painful part is that this often happens unnoticed with the emails that pay off most: the notifications your website sends.
That’s why email deliverability belongs to the technical foundation of a B2B website that generates leads, alongside speed, structure and findability.
Here’s how the leak happens:
- A prospect fills in your contact or quote form.
- Your site sends the alert on behalf of your own domain.
- It goes through a mail server your domain never listed as a valid sender.
- The alert lands in spam, or never arrives.
You don’t even know you missed that lead. A form that works perfectly but whose alert never arrives is still a leak in your form optimisation.
For more places where enquiries quietly slip away, see our guide to lead leakage.
What exactly does an SPF record do?
SPF lists which servers are allowed to send mail on behalf of your domain.
SPF stands for Sender Policy Framework. It’s essentially a guest list at the door.
When an email arrives, the receiving server checks which server sent it. If that server is on your SPF list, the check passes. If it isn’t, that’s a strong signal the email is forged.
What an SPF record looks like
In practice, an SPF record is a TXT record in your DNS that looks like this:
v=spf1 include:_spf.google.com ~all
The ending matters. In RFC 7208, ~all is a “softfail” (probably not authorised) and -all is a hard “fail”.
The most common SPF mistake
Every party that sends mail on your behalf must be included. For example:
- your mail provider
- your newsletter software
- your invoicing software
- the system behind your website forms
That’s also where it usually goes wrong. Companies add their mail provider but forget the tool that sends form notifications or invoices.
Those emails then quietly fail the check.
Why SPF alone isn’t enough
SPF looks at the technical sender address, not at what the recipient sees.
That’s why SPF alone isn’t enough, and why DKIM and DMARC exist.
What does DKIM do and why do you need it alongside SPF?
DKIM puts a digital signature on every email you send.
DKIM stands for DomainKeys Identified Mail. The signature lets the recipient verify two things: the content wasn’t changed in transit, and it really comes from your domain.
Where SPF checks the sending server, DKIM proves the authenticity of the email itself.
How the key pair works
It works with a key pair:
- Your mail server signs outgoing mail with a secret key.
- You publish the matching public key as a DNS record.
- The recipient retrieves that public key and checks the signature.
That tells the recipient whether the email is authentic and unaltered.
You don’t need to understand the cryptography. In most mail platforms you generate the key with a few clicks and paste the supplied value into your DNS.
Key length: Google says sending to personal Gmail accounts needs a DKIM key of 1024 bits or longer, and recommends 2048 bits where your provider supports it (Google’s sender guidelines).
Why you want both SPF and DKIM
SPF and DKIM cover two different risks.
An email that passes through a mailing list or forwarding service can break SPF but keep DKIM, or the other way around.
With both records in place, there’s almost always at least one valid proof left that the email really is from you.
What does DMARC do and what do p=none, quarantine or reject mean?
DMARC tells receiving servers what to do when SPF or DKIM fails.
DMARC stands for Domain-based Message Authentication, Reporting and Conformance. It’s the keystone, and it also sends you reports about who’s sending mail on behalf of your domain.
Without DMARC, SPF and DKIM are separate checks with no clear instruction on what should happen in case of doubt.
The three policy settings
You publish a DMARC record as a TXT record at _dmarc.yourdomain.be. The key part is your policy, the p= tag, which has three settings:
- p=none: monitoring. Nothing happens to failing mail, but you do receive reports. It’s the safe starting setting to see everything sent on behalf of your domain.
- p=quarantine: failing mail goes to the spam folder.
- p=reject: failing mail is refused entirely. It’s the strictest setting and the best against abuse of your domain name, but only switch it on once all your legitimate senders are correctly authenticated.
The DMARC standard, RFC 7489, also defines the rua tag (the address that receives aggregate reports) and pct (the share of mail the policy applies to).
A starting record looks like this:
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.be
Alignment: what abusers can’t forge
DMARC adds the concept of alignment. The domain the recipient sees in the From address must match the domain covered by SPF or DKIM.
That’s precisely what abusers can’t forge. It’s why DMARC offers protection that SPF and DKIM alone don’t give.
Build it up in phases
The recommended approach is phased:
- Start on
p=nonewith a reporting address. - Read the reports for a few weeks.
- Fix every sender that still fails.
- Move to
quarantine, and eventuallyreject.
Jumping to reject too quickly can block legitimate mail.
SPF, DKIM and DMARC side by side
Here’s what each record checks:
| Record | What it checks | Where it lives |
|---|---|---|
| SPF | which servers may send for you | TXT record on your domain |
| DKIM | a signature on the email itself | TXT record per sending platform |
| DMARC | what to do on failure, plus reports | TXT record at _dmarc |
Is SPF, DKIM and DMARC setup mandatory or nice-to-have?
For anyone who sends a lot of mail, it’s now a hard requirement.
Since February 2024, Google’s email sender guidelines and Yahoo’s sender requirements have asked bulk senders for three things:
- SPF and DKIM both passing
- a DMARC record with at least
p=none - one-click unsubscribe in marketing emails
When Gmail counts you as a bulk sender
Gmail counts you as a bulk sender once you send close to 5,000 messages or more to personal Gmail accounts in 24 hours.
According to Google’s sender guidelines FAQ, Gmail ramped up enforcement from November 2025, with temporary and permanent rejections for non-compliant mail.
Google also asks bulk senders to keep the spam rate in Postmaster Tools below 0.3%, and recommends staying under 0.1%.
Microsoft followed
Since 5 May 2025, Outlook.com routes mail from high-volume senders that fail SPF, DKIM or DMARC to the Junk folder.
Outright rejection was announced for later.
Why it still matters below the threshold
If you don’t send large newsletters, strictly speaking you don’t fall under that threshold.
But the underlying logic applies to everyone. The same spam filters that judge bulk senders also judge your quote email and your form notification.
Good authentication isn’t a separate rule for big players. It’s basic hygiene that decides whether your everyday business mail arrives at all.
For a B2B company that depends on leads through the website, that’s no detail.
How do you set up SPF, DKIM and DMARC?
In four steps, all in the DNS management of your domain.
Step 1: Inventory your senders
Make a list of everything that sends mail on behalf of your domain:
- your mail provider
- your newsletter tool
- your invoicing software
- the system behind your contact forms
This is the step most people skip, and the one that causes the most problems.
Step 2: Set up SPF
Publish one TXT record that lists all those senders via include rules.
Watch out: the SPF standard, RFC 7208, allows only one SPF record per domain. So everything is combined into that single record.
It also caps an SPF check at 10 DNS lookups. Each include counts, so long chains of includes fail with an error.
For example, say you combine Google Workspace, a newsletter tool, a CRM and a form service. That’s four includes, and some of them trigger extra lookups of their own.
Step 3: Set up DKIM
Activate DKIM in every mail platform you use. Then publish the corresponding public keys as DNS records.
Each platform supplies that value ready to use.
Step 4: Set up DMARC
Publish a DMARC record at _dmarc.yourdomain.be. Start on p=none with a reporting address, and build up the policy step by step.
Then check the result
Send a test email to a Gmail address and view the message details. In Gmail, open the email, click More (the three dots next to Reply), then Show original (Gmail’s help on full headers).
The top of that screen shows a pass or fail per check:
You can also use a free online checking tool to see whether all three checks pass.
DNS changes can take up to a few hours before they’re visible everywhere. So don’t expect everything to turn green right away.
Tip: run the test for every sender on your list, and start with your website form. Fill it in yourself and check the alert’s headers.
Switching to a new tool, such as one of these Mailchimp alternatives? Run this check again.
The same goes for a new form plugin or CRM. Our website launch checklist includes it for that reason.
The short summary
SPF, DKIM and DMARC together prove that an email really comes from your domain:
- SPF: checks the sending server.
- DKIM: signs the email itself.
- DMARC: decides what happens in case of doubt, and reports who mails on your behalf.
Without that trio, your business emails are treated with suspicion. Above all your form and lead notifications leak away into spam, precisely the emails that pay off most.
Map your senders, set up the three records, then build DMARC up from monitoring to enforcement.
Once alerts arrive, speed matters too. Our piece on speed to lead shows why a fast reply wins more deals.
We don’t see email deliverability as a standalone IT job. It’s part of a website that reliably brings in leads: a form is only finished when the alert actually lands in your inbox.
Want to be sure no lead gets lost between your site and your mailbox? Contact us and we’ll check your records with you.
Free website scan
Enter your website and get an automatic scan within minutes, with concrete technical and SEO improvements. No sales pitch.
We only use your details for your scan. No spam, unsubscribe anytime.