Security

SPF, DKIM and DMARC: Check Your Email Domain and Fix It Safely

Stop scammers sending email as your domain. Check SPF, DKIM and DMARC in 2 minutes, read the results and roll out fixes without blocking your own mail.

Anyone can send an email that claims to come from your domain. The From line is just text, and unless your domain publishes the right DNS records, the receiving mailbox has no reliable way to tell your real invoices from a fake one. Three records fix this: SPF, DKIM and DMARC. You don’t need to be an email engineer to set them up, but you do need to do it in the right order, or you can block your own mail. This guide shows how to check your domain in two minutes, how to read the results and how to roll out the fixes safely.

Summary: what to do

  • Check your domain first with our free email domain check. It reads your public DNS records and shows what is missing.
  • List every service that sends email as you: your mailbox provider, newsletter tool, CRM, help desk, invoicing app and website forms.
  • Publish one SPF record that covers all of them, within the 10-lookup limit.
  • Turn on DKIM signing in your email provider and in each sending service.
  • Start DMARC at p=none with a report address, read the reports, fix the senders that fail, then move to p=quarantine and finally p=reject.
  • Protect domains you don’t use for email with records that say no mail should ever come from them.

Why spoofed email from your own domain hurts you

When a scammer sends mail as accounts@example.com, the damage lands on you. Customers get “new bank details” from your finance team, suppliers get a fake purchase order, and staff get a gift card request from “the CEO”.

There is a second, quieter cost. Large mailbox providers now expect senders to authenticate: Gmail and Yahoo ask every sender for at least SPF or DKIM, and bulk senders for all three (details below). Without them, you have no way to tell receivers which mail is really yours. The records themselves are free to publish and protect both your customers and your own deliveries.

SPF, DKIM and DMARC in plain words

SPF: who is allowed to send

SPF (Sender Policy Framework, RFC 7208) is a single TXT record that lists the servers and services allowed to send mail for your domain. A receiving server checks whether the message came from one of them. The record ends with a rule for everyone else: -all means fail, ~all means soft fail (“probably not authorized”).

DKIM: a signature that proves the message wasn’t changed

DKIM (DomainKeys Identified Mail, RFC 6376) adds a digital signature to each outgoing message. The public key sits in DNS under a name called a selector, such as selector1._domainkey.example.com. The receiver uses it to confirm that the message really was signed by your domain and wasn’t altered on the way.

DMARC: the policy and the reports

DMARC ties the two together and adds two things they lack. First, it checks alignment: the domain in the visible From address must match the domain that passed SPF or DKIM. Second, it tells receivers what to do when a message fails (none, quarantine or reject) and where to send reports about who is sending mail as you. A message passes DMARC if at least one of SPF or DKIM passes and aligns. DMARC was first published as RFC 7489 and was updated in May 2026 as a standards-track specification, RFC 9989.

Check your domain in 2 minutes

Open the email domain check, type your domain or any work email address, and run it. The tool reads only public DNS records, the same ones every mail server can see, and stores nothing. You get an A to D grade, your current SPF, DKIM, DMARC and MX records, and suggested records to copy.

One caveat about DKIM: its records live under a selector name that only your email service knows. The tool tries the most common ones. If it reports DKIM as not found, check the DKIM page in your email admin console before assuming it is missing.

How to read the results

Result What it means What to do
No SPF record Nothing says which servers may send for you Publish one SPF record listing every sending service
More than one SPF record Receivers treat SPF as broken (a permanent error) Merge them into a single v=spf1 line
SPF over 10 lookups SPF fails with a permanent error at receivers that evaluate that far Remove unused includes or move a tool to a subdomain
SPF ends in ?all or +all Unknown senders are not flagged, or are even approved Use ~all or -all
DKIM not found No signature found on common selectors Turn on DKIM in your provider’s admin console
No DMARC record No policy and no reports Publish DMARC at p=none with a report address
DMARC p=none Monitoring only; fakes are still delivered Read reports, fix senders, then tighten
DMARC with no rua You get no reports about who sends as you Add rua=mailto: with a mailbox you read

A safe rollout order

The order matters because DMARC enforcement blocks anything that isn’t authenticated, including your own newsletter if you forgot it. Before you change anything, write down every service that sends mail with your domain in the From address.

Step 1: SPF

Find each sending service’s SPF include value in its setup docs and combine them into one record at the root of your domain:

Host:  example.com   (often shown as @)
Type:  TXT
Value: v=spf1 include:_spf.google.com include:spf.your-newsletter-tool.example ~all

The first include is the value Google Workspace gives for its own servers; Microsoft 365 uses include:spf.protection.outlook.com. Replace the second with what your tools actually require. Google recommends ending with ~all, while Microsoft recommends -all for Microsoft 365 domains because DMARC will make the final decision. Either is far better than no rule at all.

Step 2: DKIM

Turn on DKIM signing in your mailbox provider’s admin console. It will give you either a TXT record with a public key or CNAME records pointing to its own keys. Publish exactly what it gives you, then press the button that starts signing. Repeat for each third-party service, choosing the option that signs with your own domain rather than theirs. Google’s sender guidelines require keys of at least 1024 bits and recommend 2048.

Step 3: DMARC at p=none, with reports

Host:  _dmarc.example.com
Type:  TXT
Value: v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com

This changes nothing about delivery. It starts the reports: XML summaries, usually daily, from receivers showing which IP addresses sent mail as your domain and whether they passed. Send them to a shared mailbox, not a person’s inbox, and consider a DMARC reporting service to turn the XML into something readable. RFC 9989 explains that the point of starting at p=none is to make sure nothing was missed in your SPF and DKIM setup.

Step 4: quarantine

When the reports show your legitimate senders passing and only unknown sources failing, change p=none to p=quarantine. Failing mail now goes to spam. Keep reading the reports. Older guides, including Microsoft’s, use a pct= tag to apply the policy to part of your mail; RFC 9989 removed it, so we skip it and move one full step at a time.

Step 5: reject

After a clean period at quarantine, move to p=reject. Receivers can now refuse fake mail outright. There is no fixed timetable: RFC 9989 says moving to enforcement can take many months of report review, and it suggests at least a month at p=none and an equally long period at p=quarantine for domains whose users post to mailing lists. Microsoft suggests starting with a low-volume subdomain and leaving the main domain for last. When you are done, run the domain check again to confirm the grade.

Common mistakes

  • Two SPF records. Adding a new tool by creating a second v=spf1 record breaks SPF for the whole domain. RFC 7208 allows only one; edit the existing record instead.
  • More than 10 DNS lookups. Each include, a, mx, exists and redirect counts, and includes can contain more includes. Go over 10 and SPF returns a permanent error. Remove services you no longer use, or move marketing mail to a subdomain with its own record.
  • Forgetting third-party senders. Newsletter platforms, CRMs, help desks, billing tools and website contact forms often send as your domain. If they sign DKIM with their own domain, or use their own domain for the SPF check, DMARC fails even when SPF and DKIM “pass”.
  • Jumping straight to p=reject. It feels secure, but any sender you forgot is silently blocked. Monitor first.
  • No report address. Without rua, receivers send no aggregate reports, so you are guessing.
  • Typos in the record. A space after include:, an equals sign instead of a colon, or a trailing dot all break SPF.
  • Ignoring unused domains. Parked domains are easy to spoof because nobody watches them.

What Gmail and Yahoo require from bulk senders

In February 2024, Google and Yahoo started enforcing sender requirements. According to Google’s email sender guidelines, all senders to Gmail need SPF or DKIM, valid forward and reverse DNS for their sending servers, TLS, and a spam rate below 0.3% in Postmaster Tools. Senders of more than 5,000 messages a day to Gmail accounts must also:

  • set up SPF, DKIM and DMARC (Google says the DMARC policy can be none);
  • make the From domain align with the SPF or DKIM domain;
  • support one-click unsubscribe in marketing and subscribed messages, with a visible unsubscribe link in the body;
  • keep the spam rate below 0.30%, and ideally below 0.10%.

Yahoo’s Sender Hub asks all senders for SPF or DKIM and a spam rate below 0.3%. Bulk senders need both SPF and DKIM, a DMARC policy of at least p=none that passes, From alignment, a working one-click List-Unsubscribe header, and unsubscribes honored within 2 days. Yahoo publishes no volume threshold for “bulk”. Requirements can change, so check both pages before a large campaign.

FAQ

Do I need all three if we only send normal office email?

Yes. The bulk rules target large senders, but spoofing doesn’t care about volume, and SPF without DMARC gives receivers no policy to act on.

Will DMARC at p=reject block my own emails?

Only if a service sends as your domain without passing aligned SPF or DKIM. That is exactly what the p=none phase with reports is for. Forwarded mail and mailing lists can also break SPF or DKIM, which is another reason to go slowly.

What should I publish for domains we never use for email?

Microsoft’s guidance for parked domains is an SPF record of v=spf1 -all and a DMARC record of v=DMARC1; p=reject; at _dmarc. Together they say no mail should ever come from that domain.

How long do DNS changes take?

Usually minutes to an hour, depending on the record’s TTL. Run the check again after each change. While you are in your DNS settings, the website security check is a quick way to look at the site on the same domain.

Does DMARC stop all phishing?

No. It stops exact spoofing of your domain. It does not stop lookalike domains, or attacks sent from real accounts that were taken over, like the ones in our guide to calendar invite phishing. People still need to know what to look for. If you want your team trained to spot spoofed and lookalike mail, see our training.

How this article was made: this is our own guide, based on the SPF, DKIM and DMARC specifications (RFC 7208, RFC 6376, RFC 7489 and RFC 9989), Google’s and Yahoo’s sender requirements, and Microsoft’s SPF and DMARC setup documentation linked above. Provider values and requirements change, so confirm the exact records in your provider’s current docs. Example records use the placeholder domain example.com.

Sources

Written by the CTRL ALT AI team with AI assistance and edited by a person.

Want this done for you?

We build what we write about: AI video, automation, training and branded games.

Start a project