
On this page
SPF, DKIM and DMARC are three DNS records that prove the email sent in your domain's name is genuine. SPF lists the servers allowed to send for you, DKIM adds a digital signature to every message, and DMARC tells receiving servers what to do with messages that fail those checks. Without them your mail can land in spam, and anyone can impersonate your company with little effort.
This explainer is for business owners and whoever manages the company domain without a deep technical background. You'll learn what each record does, what its value looks like, the order to turn them on, and the mistakes that break authentication.
Why your company needs email authentication
Email was designed decades ago with no way to verify the sender. Any server can put ceo@company.com in the From field. Authentication records close that gap, and they bring two direct benefits:
1. Your mail reaches the inbox. Google requires everyone sending to Gmail accounts to authenticate their domain with at least SPF or DKIM, and senders of more than 5,000 messages a day need SPF, DKIM and DMARC together, according to Google's email sender guidelines. Microsoft applies similar requirements to high-volume senders to Outlook.com and Hotmail addresses.
2. Your company name is protected from spoofing. Scam emails impersonating the boss or the accounts team are now written in flawless language thanks to AI writing tools, as we explained in AI and business email. A strict DMARC policy makes receiving servers reject forged messages carrying your domain before they reach your customers.
What is an SPF record?
SPF (Sender Policy Framework) is a TXT record on your domain listing the servers and services allowed to send email for it. When a message arrives, the receiving server reads this record and compares it with the address of the server that sent the message. The standard is RFC 7208.
Here's a sample SPF record for a company that sends from its mail server and a newsletter service:
v=spf1 include:_spf.mailprovider.example include:newsletter.example ~all| Part | Meaning |
|---|---|
v=spf1 | Start of the record and its only version |
include: | Allow the servers of a given service |
ip4: | A specific IP address allowed to send |
~all | Everything else soft-fails (usually accepted, flagged as suspicious) |
-all | Everything else hard-fails (not allowed) |
SPF rules people often get wrong
One record only: two SPF records on the same domain make the check fail. Put every service in a single record.
The ten-lookup limit: the standard allows at most ten DNS lookups during the check, and every
includeuses some of them. Stacking too many services breaks the record.Remember everyone who sends for you: your invoicing system, online store and newsletter tool all send in your domain's name and need a place in the record.
What is DKIM?
DKIM (DomainKeys Identified Mail) is a digital signature your server adds to every outgoing message. The server keeps a private key to sign with, and you publish the public key in DNS. The receiving server reads the public key and verifies the signature, so it knows the message really came from an authorized server and its content wasn't changed on the way.
A DKIM record is published on a subdomain that contains the "selector" your mail provider gives you, like this:
selector1._domainkey.company.com TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqh..."Never write a DKIM value yourself: copy it exactly as your mail provider gives it to you. Google recommends a 2048-bit key and accepts 1024 bits as the minimum. Each service that sends for you (a newsletter tool, for example) has its own DKIM key with a different selector, so the records don't clash.
What is DMARC?
DMARC (Domain-based Message Authentication, Reporting and Conformance) is the record that brings the other two together and gives them meaning. The IETF published it as a Proposed Standard in May 2026 as RFC 9989, replacing the older RFC 7489 specification. DMARC does three things:
Alignment: it requires SPF or DKIM to pass for the same domain shown in the From address the customer sees, not just any domain.
Policy: it tells the receiving server what to do with a message that fails.
Reporting: it sends you regular summaries of every server that sent mail in your domain's name.
A DMARC record is published as a TXT record on _dmarc.company.com:
v=DMARC1; p=none; rua=mailto:dmarc@company.com| Policy | What happens to a failing message | When to use it |
|---|---|---|
p=none | Delivered normally; you get reports | Getting started and monitoring |
p=quarantine | Usually sent to spam | Once your legitimate mail is authenticated |
p=reject | Rejected, never delivered | Full protection against spoofing |
How to set up SPF, DKIM and DMARC on your domain
These steps apply to any mail provider and any DNS host:
List everyone who sends for you: your mail server, invoicing system, online store, newsletter tool and any website contact form that sends email.
Create one SPF record: a TXT record on your root domain starting with
v=spf1, anincludefor each service, ending with~allor-all.Turn on DKIM for each service: copy the DKIM record from your mail provider and from every service that sends for you, and add it under the selector they give you.
Publish DMARC in monitoring mode: a TXT record on
_dmarcwithp=noneand an address that receives the reports.Check the records: confirm each record shows the right value from several public DNS resolvers, then send a test message to Gmail and use "Show original" to see the SPF, DKIM and DMARC results.
Tighten the policy gradually: once the reports confirm all your legitimate mail passes, move to
p=quarantine, thenp=reject.
Where do you add the records? And what about domains that don't send email?
Records are added wherever your domain's DNS is managed, which isn't necessarily where you bought the domain. If the nameservers point to your web host or a service like Cloudflare, that's where you edit them. A record added anywhere else has no effect.
If your company owns extra domains it never sends email from, such as the same name on another extension kept for brand protection, those domains are easy targets for spoofing. Protect them with two simple records:
company.net TXT "v=spf1 -all"
_dmarc.company.net TXT "v=DMARC1; p=reject"The first says no server is allowed to send for the domain, and the second asks receivers to reject any message that uses it.
Common mistakes that break authentication
Two SPF records on one domain: this often happens when adding a new service, by creating a second record instead of editing the first.
A forgotten sending service: store or invoice emails fail DMARC and land in spam, or get rejected under a strict policy.
A truncated DKIM value: the key is long, and some DNS panels cut it or add spaces. Paste it in full and check it after saving.
DMARC on the wrong name: it must be on
_dmarc.company.com, not on the domain itself.Leaving
p=noneforever: monitoring is a first step, but it doesn't stop anyone from spoofing you.Sending from free Gmail under your company name: you can't authenticate a domain you don't own. Authentication needs an address on your own domain, as explained in official business email and commercial email.
How to confirm your records work
The easiest test: send a message from your mailbox to a Gmail account, open it, and choose "Show original" from the message menu. At the top you'll see the result of each check: PASS for SPF, DKIM and DMARC is what you want. If you see FAIL or NONE, review that record.
Once DMARC is on, the big mailbox providers will send you daily XML reports. You don't need to read them line by line: what matters is spotting any server sending in your name that fails, which is either a service you forgot to add or a real spoofing attempt.
For the wider picture of company email security, from passwords to malware, see business email protection. And if you're moving your domain, read about transferring a domain so your records come with it.
The bottom line
SPF says who may send, DKIM proves the message is intact, and DMARC decides what happens to forged mail and tells you what's going on. Together they've become a practical requirement for reaching the inbox at Gmail and Outlook, and basic protection for your name against spoofing. Turn them on in order, start DMARC in monitoring mode, and tighten the policy once you're confident.
Frequently asked questions
Do I need SPF, DKIM and DMARC together?
Yes, because each record covers a different part. SPF lists the servers allowed to send, DKIM signs each message, and DMARC ties both to the visible From address and decides what happens to forged mail. Google requires all three from bulk senders to Gmail.
Can a domain have more than one SPF record?
No. A domain must have exactly one SPF record starting with v=spf1, and two records make the check fail. If you send through several services, combine them in a single record with several include mechanisms.
What's the difference between ~all and -all in SPF?
-all is a hard fail: any server not listed is not allowed. ~all is a soft fail: mail is usually accepted but marked as suspicious. Many providers start with ~all, and once DMARC is in place, DMARC becomes the main decision-maker for the message.
How long do DNS records take to work?
Usually minutes to a few hours, and up to 48 hours depending on the cache time (TTL) of the old record. Check the record from several public DNS resolvers before deciding it isn't working.
Does DMARC with p=none protect my domain?
p=none doesn't block forged email, but it sends you reports on everyone sending in your domain's name. It's a necessary first step to confirm all your legitimate mail is authenticated; then you move to quarantine and reject to get real protection.
Does Emailat set these records up automatically?
Yes, when your domain uses our DNS: we add the records, check them and fix them automatically. If your DNS is hosted elsewhere, we show you the exact values to add and check them against several public DNS resolvers until they're complete.
Was this article helpful?
Be the first to rate
Share this article
About the author
فريق إيميلات

