Key takeaways
- SPF lists who may send for your domain, DKIM signs each message, and DMARC tells receivers what to do when checks fail.
- Set up SPF and DKIM first, then DMARC, always starting with p=none.
- Google and Yahoo have required authentication from bulk senders since February 2024, and Microsoft added similar rules for Outlook.com in 2025.
- Move to p=reject only after reports show all legitimate mail passing.
If your invoices land in spam, or a customer received a fake email that looked like it came from you, the fix usually starts with three DNS records: SPF, DKIM, and DMARC. Together they prove to Gmail, Outlook, and Yahoo that mail claiming to be from your domain really is, and they tell those providers what to do with forgeries.
This guide explains each record in plain terms, then walks through setup for Microsoft 365 and Google Workspace with example records you can adapt. You will need access to your DNS host (GoDaddy, Cloudflare, Network Solutions, or wherever your domain is managed) and admin access to your email platform.
SPF, DKIM, and DMARC in plain English
SPF (Sender Policy Framework) is a TXT record that lists the services allowed to send email for your domain. A receiving server checks the sending server's address against that list.
DKIM (DomainKeys Identified Mail) adds a digital signature to every outgoing message. The public key lives in your DNS. If the signature checks out, the receiver knows the message came from an authorized system and was not altered in transit.
DMARC (Domain-based Message Authentication, Reporting and Conformance) sits on top. It requires that SPF or DKIM not only pass but also align with the domain in the visible From address. It tells receivers whether to deliver, quarantine, or reject mail that fails, and it sends you reports about who is sending as your domain.
| Record | DNS location | What it does | Example |
|---|---|---|---|
| SPF | TXT at yourdomain.com | Lists allowed senders | v=spf1 include:spf.protection.outlook.com -all |
| DKIM | CNAME or TXT at selector._domainkey | Publishes signing key | google._domainkey TXT v=DKIM1; k=rsa; p=... |
| DMARC | TXT at _dmarc.yourdomain.com | Sets policy and reporting | v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com |
Why this matters now: Google, Yahoo, and Microsoft requirements
Since February 2024, Gmail and Yahoo require every sender to authenticate with SPF or DKIM. Bulk senders, which Google defines as sending roughly 5,000 or more messages a day to Gmail addresses, must have SPF, DKIM, and a DMARC record (at least p=none) with the From domain aligned. They must also offer one-click unsubscribe on marketing mail and keep spam complaint rates below 0.3 percent. Microsoft announced similar requirements for high-volume senders to Outlook.com, Hotmail, and Live.com addresses, enforced starting in 2025.
Even if you are nowhere near 5,000 messages a day, mail without proper authentication is more likely to be filtered. Setting all three up is the baseline as of 2026.
Set up SPF, DKIM, and DMARC
STEP 01Inventory everything that sends email as your domain
Before touching DNS, list every service that sends mail with your domain in the From address: Microsoft 365 or Google Workspace, your newsletter platform (Mailchimp, Constant Contact, HubSpot), your CRM, invoicing (QuickBooks Online), help desk, website contact forms, scanners and copiers that email, and any line-of-business software. Each one will need to be included in SPF or set up with its own DKIM, or it will fail DMARC later.
STEP 02Publish one SPF record
Create or edit a single TXT record at the root of your domain (host @). Examples:
- Microsoft 365 only:
v=spf1 include:spf.protection.outlook.com -all - Google Workspace only:
v=spf1 include:_spf.google.com ~all - Microsoft 365 plus SendGrid:
v=spf1 include:spf.protection.outlook.com include:sendgrid.net -all
Use the exact include value each vendor documents. End with -all (hard fail) or ~all (soft fail). Since DMARC will handle enforcement, either is acceptable, and ~all is the safer choice while you are still finding senders.
Never publish two SPF records, and keep the total DNS lookups (each include, a, mx, and redirect) at 10 or fewer. Going over the limit causes SPF to fail for all your mail. An online SPF checker will count lookups for you.
STEP 03Turn on DKIM in Microsoft 365
Sign in to the Microsoft Defender portal at security.microsoft.com and go to Email & collaboration > Policies & rules > Threat policies > Email authentication settings, then the DKIM tab. Select your custom domain. Microsoft shows two CNAME records, for selector1._domainkey and selector2._domainkey, pointing to values unique to your tenant.
Copy those two CNAME records exactly into your DNS host. Wait for DNS to update, return to the DKIM page, and switch Sign messages for this domain with DKIM signatures to Enabled. If it errors, DNS has not propagated yet. Try again later.
Do not type the CNAME targets from an online example. Microsoft has changed the target format for newer domains, so always copy the values shown for your own tenant.
STEP 04Turn on DKIM in Google Workspace
In the Google Admin console, go to Apps > Google Workspace > Gmail > Authenticate email. Select your domain and click Generate new record. Choose a 2048-bit key (use 1024 only if your DNS host cannot handle long records) and keep the default prefix google.
Google shows a TXT record named google._domainkey with a value beginning v=DKIM1; k=rsa; p=. Add it at your DNS host, wait for it to propagate, then return to the Admin console and click Start authentication. The status should change to "Authenticating email with DKIM."
STEP 05Set up DKIM for third-party senders
Each newsletter, CRM, or billing service that sends as your domain has its own domain authentication setup, usually two or three CNAME records. Look for "domain authentication," "sender authentication," or "custom DKIM" in the service's settings. This is what makes DMARC alignment work for mail that does not pass through Microsoft or Google.
STEP 06Publish a DMARC record at p=none
Create a TXT record with host _dmarc and a value like:
v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com; fo=1
p=none means monitor only. rua is where receivers send daily aggregate XML reports. These reports are hard to read by hand, so most businesses send them to a DMARC analysis service (such as Valimail, dmarcian, EasyDMARC, Cloudflare's free DMARC Management, or Postmark's free weekly digests) that turns them into readable dashboards.
STEP 07Review reports and fix failing senders
Watch the reports for two to four weeks. Look for legitimate services that fail SPF or DKIM alignment. Common culprits are copiers that send scan-to-email, website forms, and accounting software. Fix each by adding it to SPF, setting up its DKIM, or routing it through Microsoft 365 or Google Workspace with an authenticated connector or SMTP relay.
STEP 08Move to quarantine, then reject
Once legitimate mail is consistently passing, change the policy to quarantine. You can phase it in with the pct tag:
v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc-reports@yourdomain.com
Raise pct to 100 over a few weeks. After a clean period at full quarantine, move to:
v=DMARC1; p=reject; rua=mailto:dmarc-reports@yourdomain.com
At p=reject, receivers refuse mail that fails DMARC, which is what stops criminals from spoofing your domain. Keep monitoring reports, because new services get added over time.
Spoofed vendor and title-company emails are a common setup for wire fraud in Los Angeles real estate, escrow, and legal transactions. A p=reject DMARC policy protects your clients from fake mail using your exact domain, but it cannot stop look-alike domains, so keep a phone verification rule for any change in wiring instructions.
Email security best practices beyond DNS
SPF, DKIM, and DMARC protect your domain's reputation. They do not stop every phishing email aimed at your staff. Pair them with:
- Multi-factor authentication on every mailbox. See how to enable two-factor authentication.
- Advanced email filtering such as Microsoft Defender for Office 365 Plan 1 (included in Business Premium) or Google Workspace's enhanced pre-delivery scanning, with Safe Links and attachment sandboxing.
- External sender tags so staff can see when a message comes from outside the company.
- Block automatic forwarding to external addresses, a common trick after an account takeover.
- Disable legacy authentication such as basic-auth POP and IMAP.
- Regular phishing training. Our guide on how to spot a phishing email is a good starting point for staff.
- Domain protection for parked and non-sending domains: publish
v=spf1 -allandv=DMARC1; p=reject;so they cannot be spoofed either.
When to call an IT professional
DMARC is simple in concept but easy to get wrong when a business has a dozen services sending email. If you are not sure what is sending as your domain, or you are seeing failures in reports you cannot explain, it is worth a second set of eyes. Los Angeles IT sets up and monitors email authentication as part of our Microsoft 365 support and Google Workspace support, at $95 an hour with no long-term contract.