SPF, DKIM and DMARC Explained for Gmail Senders
SPF, DKIM and DMARC explained in plain English: what each record does, why sending from your domain through another provider needs them, and how to check.
The Send As Team
4 min read
SPF, DKIM and DMARC are three DNS-based checks that let a receiving server confirm an email really came from your domain. SPF lists the servers allowed to send for you, DKIM signs each message, and DMARC says what to do when those checks fail or do not match your From address. If you send from your own domain through any provider, you need all three.
This matters more after Gmail’s change. Google’s notice says Send mail as for non-Google addresses ends in January 2027, so many people will start sending from [email protected] through a different route. Each new route is a new sender, and your DNS has to say it is allowed.
What does SPF do?
SPF (Sender Policy Framework) is a TXT record on your domain that lists which servers may send mail using it. The receiver compares the connecting server with that list.
A generic example, with placeholders:
yourbiz.com. TXT "v=spf1 include:spf.provider-a.example include:spf.provider-b.example ~all"
- Each
include:authorises one provider. Use the exact value your provider documents. ~allmeans “treat others as suspicious”;-allmeans “reject others”.- One SPF record per domain. If you add a provider, merge its include into the existing record. Two records is an error (RFC 7208).
- SPF allows at most 10 DNS lookups across its includes (RFC 7208). Remove providers you no longer use.
SPF checks the hidden envelope sender (the bounce address), not the From line people see. That gap is why DMARC exists.
What does DKIM do?
DKIM (DomainKeys Identified Mail) signs outgoing messages with a private key held by your sending provider. You publish the matching public key in DNS at a selector name:
selector1._domainkey.yourbiz.com. TXT "v=DKIM1; k=rsa; p=PUBLIC_KEY_FROM_YOUR_PROVIDER"
The selector (selector1 here) and the key come from your provider, and some use CNAME records instead. Receivers fetch the key and verify the signature. DKIM survives forwarding better than SPF because the signature travels with the message.
What does DMARC do?
DMARC ties it together. It requires that SPF or DKIM passes and aligns, meaning the domain they verified matches the domain in the visible From address. It also says what to do on failure and where to send reports:
_dmarc.yourbiz.com. TXT "v=DMARC1; p=none; rua=mailto:[email protected]"
p=none: monitor only. A sensible start.p=quarantine: send failures to spam.p=reject: refuse failures.
Move up only once your legitimate mail passes.
Why does sending through a different provider need all three?
Your domain’s records describe who may send as you. If you send from [email protected] through a provider that is not in your SPF and has no DKIM key published for your domain, receivers see a message claiming to be you from a stranger. Best case it lands in spam; worst case it is rejected. This is the core reason mail goes to spam after a change in how you send. See custom domain emails going to spam for a fix checklist.
Each tool that sends as you needs to appear in SPF, sign with DKIM, or both, so that DMARC passes.
How do I check my records?
- Send a message from your domain to an unrelated Gmail address.
- Open it, use the three-dot menu, choose Show original, and read the SPF, DKIM and DMARC lines. Our walkthrough: how to read Show original.
- Look up your TXT records with any DNS lookup tool to confirm there is one SPF record, a DKIM record at your provider’s selector and a DMARC record at
_dmarc.
Send As includes a built-in SPF, DKIM and DMARC check that runs in your browser over DNS-over-HTTPS, but it is only one convenience; the manual check above works with any tool. Per our own docs, the built-in check cannot see everything.
What are the most common mistakes?
- Two SPF records. Often caused by adding a provider’s recommended record without looking for an existing one.
- Too many includes. Past 10 DNS lookups SPF breaks. Remove providers you no longer use.
- DKIM enabled at the provider but never published. The provider says “verified” only after DNS propagates; check again later.
- Jumping to p=reject. If a legitimate sender is missing, you will block your own mail. Watch reports at
p=nonefirst. - Forgetting side senders. Newsletter tools, invoicing apps and help desks that send as your domain also need authorising.
How does forwarding interact with these records?
When you forward mail into Gmail, the forwarding server is not in the original sender’s SPF, so SPF can fail on the hop while DKIM still passes. That is one reason DKIM matters. It affects mail you receive; for the setup side see forwarding custom domain email to Gmail.
How long do DNS changes take?
It depends on your DNS host and the record’s time-to-live. Some changes appear within minutes, others take hours. If a check still shows the old value, wait and test again before changing anything else. Changing records repeatedly while waiting is a common way to end up with duplicates.
What to do next
Write down every service that sends as your domain, merge them into one SPF record, enable DKIM at each provider and start DMARC at p=none. Provider-specific details are in our cPanel, GoDaddy and Cloudflare guides. If you pick Send As, the setup guide runs this check for you.
Frequently asked questions
What is the difference between SPF, DKIM and DMARC?
SPF lists which servers may send for your domain. DKIM adds a cryptographic signature proving the message was not altered and came from your domain. DMARC tells receivers to require SPF or DKIM to line up with the visible From address, and what to do if they do not.
Can a domain have two SPF records?
No. A domain must publish exactly one SPF record. Two records cause a permanent SPF error at many receivers. If you add a sending provider, merge its include mechanism into your existing record rather than creating a second one.
Do I need all three to send from Gmail with my own domain?
For reliable delivery, yes. Gmail and other big receivers expect mail from your domain to pass SPF or DKIM and align with the From address. Start DMARC at p=none to monitor, then tighten it once SPF and DKIM pass.
How do I check SPF, DKIM and DMARC?
Send a message to an unrelated Gmail address, open it, choose Show original and read the SPF, DKIM and DMARC results. You can also look up your DNS TXT records with a DNS lookup tool. Both should show pass.
Keep reading
Emails From My Domain Going to Spam? Fix Checklist
Emails from your domain going to spam? Work through this checklist of SPF, DKIM, DMARC, new-domain reputation and reply-to problems, then test the fix.
4 min read
Gmail Show Original: Read SPF, DKIM and DMARC Results
How to use Gmail Show original to read SPF, DKIM and DMARC PASS and FAIL results, what each result means, and how to test your domain with an unrelated Gmail.
4 min read
Forward Custom Domain Email to Gmail: 3 Ways That Work
How to forward custom domain email to Gmail with your host, Cloudflare Email Routing or a forwarding service, plus how to test it and avoid loops and spam.
4 min read