Free Email Checker Free Email Checker
Security Records

How to Set Up SPF, DKIM and DMARC (Without Getting Lost in the Acronyms)

How to Set Up SPF, DKIM and DMARC (Without Getting Lost in the Acronyms)

In short

  • SPF lists which servers may send mail for your domain. DKIM signs each message so tampering can be detected. DMARC ties both to your visible From address and sets the policy.
  • Publish one SPF record, and turn on DKIM for every service that sends as you.
  • Start DMARC at monitor-only, read the aggregate reports, then move to quarantine and finally reject once legitimate senders all pass.
  • Gmail and Yahoo expect these records from bulk senders, and Microsoft now applies similar rules, so this is a baseline, not an extra.
  • Check your setup after every change, and whenever a new tool starts sending mail for you.

If you send email from your own domain, three short lines of DNS decide a surprising amount of what happens next. They tell receiving servers which machines may send mail for you, give each message a signature that proves it was not altered, and explain what to do with messages that fail those tests. They are called SPF, DKIM and DMARC, and together they are the foundation of modern email authentication.

Setting them up is not difficult, but the details are unforgiving. A missing character, a second SPF record or a DMARC policy switched on too early can quietly send legitimate mail to spam. This guide explains what each record does, shows how to write one, walks through a safe rollout, and lists the mistakes that cause the most trouble.

Illustration of SPF, DKIM and DMARC records protecting a sending domain
The three records work as a set: who may send, proof the message is genuine, and what to do on failure.

Why these three records exist

The original email protocol was designed in a more trusting era. Nothing in the basic system stops anyone from writing "From: you@yourdomain.com" on a message sent from somewhere else entirely. Spammers and phishers used this for decades to impersonate banks, shops and colleagues.

Authentication closes that gap. Receivers can now check whether a message claiming to come from your domain was actually sent by a server you approved, and whether it was tampered with in transit. Mailbox providers use the results as one of their strongest signals when deciding between the inbox and the spam folder. Large providers also now require authentication from bulk senders, and Google's published rules are worth reading if you send at volume: Google's email sender guidelines.

Even if you only send a few hundred messages a month, authentication protects your domain from being forged and protects the people who trust your name. It also helps your own mail get delivered, which is the practical reason most site owners care.

What Google, Yahoo and Microsoft expect from senders

Authentication stopped being a nice extra for larger senders in 2024. Google's own sender guidelines say that since February 1, 2024, anyone sending more than 5,000 messages a day to Gmail accounts must set up SPF, DKIM and DMARC, and that every sender, whatever the volume, needs at least SPF or DKIM. Yahoo introduced matching rules at the same time. Microsoft later announced comparable rules for Outlook.com, Hotmail and Live addresses; Amazon's messaging team reported that enforcement started on May 5, 2025.

ProviderWho it applies toWhat is expectedWhere to read it
Google (Gmail)Everyone; stricter above 5,000 messages a day to GmailSPF or DKIM for all senders; SPF, DKIM and DMARC for bulk sendersGoogle email sender guidelines
YahooBulk senders to Yahoo addressesAuthentication and easy unsubscribe, broadly the same as GoogleYahoo Sender Hub
Microsoft (Outlook.com, Hotmail, Live)Senders of more than 5,000 messages a day to those addressesSPF and DKIM, plus a DMARC policy of at least p=none that alignsAWS summary of the rules, then Microsoft's own announcement

Two practical points follow. First, the 5,000-a-day line is about volume to one provider's consumer mailboxes, but nothing stops a smaller sender from being filtered for lacking authentication, so treat the three records as the baseline whatever your size. Second, most summaries describe p=none as the minimum DMARC policy for bulk senders. That satisfies the rule, but it does not stop anyone forging your domain, which is why the rollout later in this guide goes further.

Marketing mail has extra expectations: Google's guidelines also cover spam-complaint rates and one-click unsubscribe, and the unsubscribe mechanism is specified in RFC 8058. Read the current wording on Google's page rather than relying on a number quoted in an article, because thresholds can change. Source note: Google's page was checked on 29 November 2026; the Yahoo and Microsoft details come from secondary reports and should be confirmed on their own sites before you rely on them.

The Google Postmaster Tools dashboard is the free way to see how Gmail views your domain, including authentication results and spam rate, once your volume is high enough for it to show data.

How a receiving server checks one message

It helps to follow a single message through the checks, because most confusion about SPF, DKIM and DMARC comes from not knowing which address each one looks at. A message actually carries two sender addresses. The envelope sender (also called the return path or MAIL FROM) is used by servers while they hand the message over and is where bounces go. The From header is the address people see in their mail app, defined in RFC 5322. They are often different, especially when a newsletter platform sends for you.

Flow chart showing a receiving server running SPF, DKIM and DMARC checks and then applying the policy
The order of checks: SPF looks at the envelope domain, DKIM at the signing domain, and DMARC compares both with the visible From domain.
  1. Connection. The receiving server notes the IP address that is connecting, the envelope sender and the From header.
  2. SPF. It looks up the SPF record for the envelope domain and checks whether the connecting IP is allowed. The result is pass, fail, softfail, neutral, or an error such as permerror (a broken record) or temperror (a temporary DNS problem).
  3. DKIM. It finds each DKIM signature in the headers, fetches the public key named by the signature's d= and s= values, and verifies that the signed headers and body are unchanged.
  4. DMARC. It looks up the policy at _dmarc on the From domain. DMARC passes if SPF passed and the SPF domain matches the From domain, or DKIM passed and the signing domain matches the From domain. Either route is enough.
  5. Policy and reporting. The receiver applies your p= choice to messages that fail, and records the outcome for the aggregate report it will later send to your rua address.
  6. Everything else. Reputation, content, complaint history and recipient behaviour still decide inbox or spam. Authentication gets a message taken seriously; it does not guarantee delivery.

Keep that picture in mind. When something fails, the first question is always: which check, looking at which domain?

SPF: who is allowed to send

The Sender Policy Framework, defined in RFC 7208, is a list published in DNS of the servers that may send mail using your domain in the envelope sender (the "return path"). When a message arrives, the receiving server looks up your SPF record and checks whether the connecting server's IP address is on the list.

What an SPF record looks like

An SPF record is a TXT record on your domain. A typical one reads:

v=spf1 include:_spf.google.com include:sendgrid.net ip4:203.0.113.10 ~all

Read left to right, it says: this is an SPF version 1 record; mail from Google Workspace's servers is allowed; mail from SendGrid's servers is allowed; mail from the single IP address 203.0.113.10 is allowed; and everything else is a "soft fail".

The pieces you will use

  • include: pulls in another organisation's published list. Your email provider will tell you what to include.
  • ip4: and ip6: authorise a specific address or range, which is how you approve your own servers.
  • a and mx: authorise the addresses your domain's A or MX records point to.
  • The ending: -all means "reject anything not listed" (hard fail), ~all means "treat anything else as suspicious" (soft fail), and ?all means "no opinion". Most domains start with ~all and move to -all once they are sure the list is complete.

SPF rules that trip people up

  • One record only. A domain must have a single SPF record. Publishing two causes SPF to fail entirely. If you add a new sending service, merge it into the existing record.
  • Ten lookups, maximum. Every include, a, mx and similar mechanism counts toward a limit of ten DNS lookups during evaluation. Go over and SPF returns an error. Stacking many services is the usual cause, and tools that "flatten" the record can help.
  • Subdomains are separate. A record on example.com does not automatically cover mail.example.com. If you send from a subdomain, publish a record there too.
  • SPF checks the envelope, not the visible From. That is why SPF alone cannot stop forged From addresses, and why DMARC exists.
The SPF, DKIM and DMARC checker showing the records found for a domain
The free checker reads all three records for a domain and flags problems in one view.

DKIM: proof the message is genuine

DomainKeys Identified Mail, defined in RFC 6376, attaches a digital signature to each outgoing message. Your mail server signs selected parts of the message, including the headers and body, with a private key that only it holds. You publish the matching public key in DNS. The receiver fetches the public key and verifies the signature. If anything was changed after signing, the check fails.

Where the key lives

The public key is published as a TXT record at a name built from a "selector" you choose, followed by ._domainkey and your domain. For example, with the selector mail2026 the record sits at mail2026._domainkey.example.com and looks like:

v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...

The long p= value is the public key. Selectors let you run several keys at once, for example one per sending service, and rotate keys without downtime.

How you actually set it up

You rarely generate keys by hand. Most providers, such as Google Workspace, Microsoft 365 and transactional services, generate the key for you and give you the record to paste into DNS. The steps are almost always the same:

  1. In your email provider's admin area, find the authentication or domain settings and choose to enable DKIM.
  2. Copy the record name (the selector host) and the value they show you.
  3. Add it as a TXT record in your DNS provider, or as a CNAME if the provider asks for that instead.
  4. Wait for DNS to update, then use the provider's "verify" or "start signing" button.
  5. Send a test message and confirm that the headers show a passing DKIM result.

DKIM details worth knowing

  • Use 2048-bit keys where your provider supports them. 1024-bit keys are still seen but are considered weaker.
  • Long keys may need splitting. Some DNS control panels limit a single string to 255 characters, so a long key must be entered as several quoted strings in one record. Many panels do this automatically.
  • Every service that sends as you needs its own DKIM. Your newsletter platform, your help desk and your billing system each sign with their own key.
  • Rotate occasionally. Publish a new selector, switch signing to it, and retire the old one after a while.

DMARC: what to do when checks fail

SPF and DKIM each say something, but neither tells receivers what to do about a failure, and neither is tied to the address people actually see in their mail client. Domain-based Message Authentication, Reporting and Conformance, defined in RFC 7489, fills both gaps. It requires that at least one of SPF or DKIM passes and that the passing domain aligns with the visible From domain. It also lets you publish a policy and receive reports.

A basic DMARC record

DMARC lives in a TXT record at _dmarc.yourdomain.com. A safe starting record is:

v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com

The important tags are:

  • p= is the policy: none (monitor only), quarantine (treat as suspicious, usually spam folder) or reject (refuse the message).
  • rua= is where aggregate reports are sent. These XML summaries show which servers are sending mail as your domain and whether they pass.
  • sp= sets a separate policy for subdomains.
  • adkim= and aspf= choose relaxed (r) or strict (s) alignment. Relaxed is the default and usually right.
  • pct= applies the policy to only a percentage of failing mail, which helps during rollout.

Why alignment matters

Suppose your newsletter tool sends from its own servers. SPF may pass for the tool's domain, and DKIM may pass for the tool's domain, yet neither matches the domain in your From address. DMARC would still fail. The fix is to configure the tool to sign with your own domain (a custom DKIM key) and to use a custom return path. This is the most common reason a "properly set up" domain still fails DMARC.

A safe rollout, step by step

The mistake that causes real damage is jumping straight to a strict policy. Authentication should be introduced in stages, with time to observe in between.

Step 1: List every service that sends as you

Make a complete inventory. Include your main mailbox provider, your newsletter platform, your website's contact form, your online store, invoicing software, a CRM, a help desk, and any server or script that sends alerts. Forgotten senders are what break when a strict policy arrives.

Step 2: Publish SPF

Build a single record that includes all of the above. Start with ~all. Check that you have not exceeded ten lookups, and check it with the SPF, DKIM and DMARC checker.

Step 3: Enable DKIM on every service

Turn on signing for each sender and confirm that messages from each one show a DKIM pass with your own domain. Send test mail from every system, not just the main one.

Step 4: Publish DMARC at p=none

Add the record with a reporting address. Leave it at none for several weeks, ideally a month or more, so that you see a full cycle of your sending. Aggregate reports are hard to read raw, so many people use a free or low-cost report reader to turn the XML into a table.

Step 5: Fix what the reports reveal

Look for senders that fail alignment: a forgotten invoice system, a marketing tool without custom DKIM, a server that is not in SPF. Fix them one by one until legitimate mail passes consistently.

Step 6: Move to quarantine, gradually

Change the policy to quarantine, optionally with pct=10, then raise the percentage over several weeks while monitoring for problems.

Step 7: Consider reject

Once you are confident, p=reject gives the strongest protection against spoofing. Some small domains stay at quarantine, which is also a respectable position. The right level depends on how much impersonation risk you face and how well you control your senders.

Set it up for the kind of sender you are

The records are the same everywhere, but the buttons and hostnames differ by platform. The exact values always come from your provider's admin screen, so treat the examples below as a map of what to look for rather than something to copy blindly.

Google Workspace

For SPF, the include is normally include:_spf.google.com. For DKIM, you generate a key in the Admin console under the Gmail authentication settings, publish the TXT record it shows (the default selector is usually google), wait for DNS, and then press the button to start authentication. The step people forget is that generating the key does nothing until signing is switched on.

Microsoft 365

SPF normally uses include:spf.protection.outlook.com. DKIM is set up with two CNAME records named selector1._domainkey and selector2._domainkey that point to hostnames under your organisation's onmicrosoft.com domain, and then enabled for the domain in the security portal. Two selectors exist so Microsoft can rotate keys for you.

Newsletter and marketing platforms

These tools send from their own infrastructure, so alignment is the thing to get right. Add the DKIM records they give you (often CNAMEs) so that messages are signed with your domain, and set up a custom return-path or bounce domain if they offer one. Some platforms ask you to add an include to your SPF record; others authenticate through their own return-path domain instead. Follow their instructions rather than guessing, and send a test to confirm the result in the headers.

Transactional email and your website

Password resets, order receipts and contact-form notices are among the most important messages you send, and the easiest to break. A WordPress site, for example, uses the server's own mail function by default, with a From address such as wordpress@yourdomain. That mail usually carries no DKIM signature for your domain and may come from an IP that your SPF record does not list. The fix is to send through an SMTP or API-based email service, authenticate your domain with that service, and then test every form and notification the site produces. Contact forms also attract fake submissions, so pair authentication with address checks such as the email verifier and the advice in How to Spot a Disposable Email Address.

Your own mail server

List the server's fixed IP addresses with ip4: or ip6: in SPF, install DKIM signing software and publish its key, and make sure the server's reverse DNS (PTR record) matches its hostname. Receivers use that match as another sign that the server is run properly. Mail routing for incoming messages is a separate topic, covered in What Does an MX Record Actually Do? A Beginner's Guide, and you can inspect it with the MX lookup.

Alignment and aggregate reports in practice

Alignment is where "all my checks pass" and "DMARC fails" can both be true. DMARC does not just ask whether SPF or DKIM passed; it asks whether the domain that passed matches the domain in the visible From address. In relaxed mode, the default, a subdomain of the same organisational domain matches. In strict mode, the domains must be identical.

Three examples showing DMARC passing, passing only in relaxed mode, and failing because of misalignment
The same From address can pass or fail depending on which domain signed or sent the message.

Most real-world failures are the third case in that diagram: a vendor signs with its own domain and bounces go to its own return path, so SPF and DKIM both pass for the vendor while DMARC fails for you. The cure is the custom DKIM and custom return path described above.

What an aggregate report contains

Receivers that support DMARC send an XML file, usually once a day, to the address in your rua tag. For each sending IP it lists how many messages claimed your domain, the SPF and DKIM results, whether each aligned, and what the receiver did with the mail. It does not contain message content. Failure reports (the ruf tag) are separate, are sent rarely, and many providers do not send them at all, so plan around the aggregate reports. DMARC RUA vs RUF Reports: What Each One Is and Which You Need explains the difference between the two in detail.

How to work through the reports

  1. Group by source. Sort rows by sending IP or by the organisation that owns it. A report reader makes this much easier than raw XML.
  2. Label each source. Is it one of your known services, a vendor you forgot, or something you do not recognise?
  3. Fix known sources first. A known sender that fails alignment needs custom DKIM, a custom return path, or an SPF change.
  4. Investigate the unknowns. Unknown sources with real volume are either forgotten internal systems or someone forging your domain. The second group is exactly what a stricter policy will stop.
  5. Repeat until clean. Only move to a stricter policy when the legitimate rows pass consistently across several weeks.

Two housekeeping details save trouble. Reports can be sent to a mailbox on a different domain only if that other domain publishes a record authorising it, so the easiest setup is a mailbox on the same domain. And an address like dmarc-reports@ is a shared role mailbox, not a person's inbox; read Role-Based vs. Personal Email Addresses: Why It Matters for Your List for why those need a plan so that the mailbox does not bounce or fill up unnoticed.

SPF limits and DKIM keys in practice

Staying inside the ten-lookup limit

The limit described earlier is easy to hit because includes nest: each service's own record may include further services, and every nested include counts. A domain that lists a mailbox provider, a newsletter tool, a help desk, a CRM and a billing system can pass ten without anyone noticing, and the failure only shows up as intermittent SPF errors.

Diagram of which SPF mechanisms count toward the ten DNS lookup limit and which do not
Includes, a, mx, ptr, exists and redirect count; ip4, ip6 and all do not.

Your options, in order of preference: remove services you no longer use; move high-volume vendors onto their own subdomain with their own SPF record; replace some includes with ip4: ranges you control; or use a flattening service that resolves includes into IP lists automatically. Flattening by hand is a trap, because a vendor's IP addresses change and a stale list silently starts failing. RFC 7208 also tells receivers to limit lookups that return nothing, so references to services that no longer exist can cause errors even when the total looks low.

Managing DKIM keys over time

Diagram of DKIM signing with a private key and verification with the public key published in DNS
The sender signs with a private key; the receiver fetches the public key from DNS using the selector named in the signature.
  • One selector per service. It keeps problems separable: if the newsletter tool's key breaks, the main mailbox is unaffected.
  • Rotate on a schedule. Publish a new selector, switch signing to it, keep the old record for a few weeks so that delayed mail still verifies, then remove it. Providers that use CNAME-based DKIM often rotate for you.
  • Never share the private key. It stays on the signing system. Only the public key goes in DNS.
  • Avoid changing signed content afterwards. A gateway that appends a legal footer after signing will break the signature, because the body no longer matches the hash. Add footers before signing, or have the same system do both.
  • Know that tools need the selector. A checker cannot guess an unusual selector name. If a tool reports no DKIM record but your headers show a pass, give the tool the selector from the signature's s= value.

Forwarding, mailing lists and ARC

Authentication was designed around direct delivery, so intermediaries can cause failures that are nobody's configuration mistake. When a message is forwarded, the envelope sender stays the same but the forwarding server's IP is not in your SPF record, so SPF fails at the final destination. DKIM usually survives because the signed content is untouched, which is another reason to have DKIM on every sender. Mailing lists are harder: they often add a subject tag or footer, which breaks the DKIM signature, and may resend from their own servers, which breaks SPF. A person on a strict-policy domain who posts to a list can find their messages rejected.

The Authenticated Received Chain (RFC 8617) lets intermediaries record the authentication results they saw, so the final receiver can choose to trust them. Whether it does is the receiver's decision, so ARC reduces these failures without removing them. In practice, if staff regularly use mailing lists or forwarding from your main domain, staying at p=quarantine there is a reasonable position, while a dedicated sending subdomain for newsletters and system mail can go to p=reject sooner because you control every sender on it.

Common mistakes and how to fix them

Two SPF records

Adding a new service often means pasting a second SPF record. Do not. Merge it into one record, or SPF will fail.

Too many DNS lookups

If SPF reports an error about lookups, remove services you no longer use, replace some includes with direct IP ranges, or use a flattening service.

Pasting a DKIM key with stray spaces or quotes

Some control panels add quotation marks themselves. If your record fails, check for doubled quotes, line breaks or missing characters in the key.

Moving to reject too early

A strict policy applied before every sender is aligned will bounce your own invoices and password resets. Stay at monitor mode until the reports are clean.

Forgetting subdomains

If you send from news.example.com, check that it has its own SPF and DKIM, or that your DMARC subdomain policy fits.

Ignoring the reports

A DMARC record without anyone reading the reports provides little value beyond the policy itself. Even a monthly look catches new, unauthorised or broken senders.

Authentication without a clean list

Passing all three checks does not guarantee inbox placement. If you mail addresses that bounce or complain, your reputation will still suffer. Pair authentication with verification, as described in Why Email Verification Matters (And What Happens If You Skip It), and keep an eye on How to Protect Your Sender Reputation Before It's Damaged.

A symptom-to-fix table

When something breaks, work from the message headers. Open the original message source in your mail app and find the Authentication-Results header, then match what you see.

Flow chart for troubleshooting SPF, DKIM and DMARC failures using the Authentication-Results header
Start with the DMARC result, then follow the failing check to its usual causes.
What you seeLikely causeWhat to do
spf=permerrorTwo SPF records, a syntax error, or more than ten lookupsMerge into one record, fix the syntax, reduce lookups
spf=fail for a service you useThe sending IP is not covered by your recordAdd the service's include or IP range
spf=pass but dmarc=failThe envelope domain is the vendor's, so it does not alignSet up a custom return-path domain, or rely on aligned DKIM
dkim=noneSigning is not enabled, or the sending system is not the one you configuredSwitch signing on and test from that exact system
dkim=fail (body hash mismatch)Something changed the message after it was signedMove footer or tag insertion before signing
dkim key not foundWrong selector, missing record, or stray quotes in the pasted valueCompare the selector in the signature with the DNS name; re-enter the value
No DMARC record foundThe record is at the wrong name or has a typo in v=DMARC1Publish the TXT record at _dmarc.yourdomain.com
Reports show unknown IPsA forgotten service, or someone forging your domainIdentify the owner of each IP; fix yours, let policy handle the rest
Gmail bounce mentions authenticationSender requirements not metFollow the link in the bounce to Google's sender guidelines and the checklist above

If everything passes yet delivery is still poor, the cause is elsewhere: sender reputation, a blocklisting, or the quality of your list. Those are covered in How to Protect Your Sender Reputation Before It's Damaged, Why Is My Domain on a Blacklist? (And How to Check) and Why Are My Emails Bouncing? A Practical Troubleshooting Guide.

Authentication is only one layer

A fully authenticated domain can still land in spam if it mails dead addresses, role accounts that never respond, or spam traps. Authentication proves who you are; list quality shows how you behave. Check addresses before you send with the email verifier, filter throwaway signups with the disposable email checker, and understand the risky categories in What Is a Catch-All Email Domain? (And Why It Complicates Verification). For existing lists, How to Bulk Verify an Email List for Free walks through the cleanup. If you are comparing free checkers for the DNS side, see how the FEC checker compares with MXToolbox, and the other free tools on the free tools page. ZeroBounce also offers a free DMARC checker, and our comparison in Looking for a Free Alternative to ZeroBounce? explains where the services differ.

A 13-week plan you can follow

The rollout steps earlier explain what to do; this calendar shows how long to expect it to take for a typical small organisation. Larger or messier setups take longer, and nothing here is a deadline that overrides what your reports show.

Timeline of a thirteen-week DMARC rollout from sender inventory to a reject decision
Inventory first, monitor next, tighten gradually, and decide on reject only when reports are clean.
  • Weeks 1-2: inventory every sender, publish one SPF record, enable DKIM on each service, and check results with the SPF, DKIM and DMARC checker.
  • Weeks 3-6: publish DMARC at p=none with a reporting address; read the reports weekly and fix every legitimate failure.
  • Weeks 7-10: move to p=quarantine with pct=10, then raise to 25, 50 and 100 as long as no legitimate mail is being caught.
  • Weeks 11-13: decide between staying at quarantine or moving to p=reject, based on how well you control your senders.
  • Afterwards: read reports monthly; each quarter re-check the sender list, test links and records, and rotate DKIM keys if due. A scheduled check from the deliverability monitor catches the breakage between those reviews.

How to test your setup

After each change, test rather than assume. There are three good approaches.

  1. Use a checker. The SPF, DKIM and DMARC checker reads the records published for your domain and flags syntax errors, duplicate records and lookup problems.
  2. Read message headers. Send a test to a personal mailbox, open the original message source, and find the Authentication-Results header. It should show spf=pass, dkim=pass and dmarc=pass.
  3. Watch over time. DNS changes, services change and people forget. The deliverability monitor can re-check your domain on a schedule so that a broken record is noticed quickly instead of months later.

It also helps to confirm that the domain itself is healthy. If your mail still fails after the records are correct, check that the domain is not listed anywhere with the blacklist checker, and read Why Is My Domain on a Blacklist? (And How to Check) for what to do next. If mail is bouncing for reasons that are not authentication, Why Are My Emails Bouncing? A Practical Troubleshooting Guide will help you read the error codes.

Where to learn more

The RFCs linked above are the authoritative sources and are readable if you want depth. The DMARC.org overview is a friendly starting point for the policy and reporting side. Your own email provider's documentation is usually the best place for exact, current instructions on publishing records for their service. For the standards behind forwarding and unsubscribe, see RFC 8617 and RFC 8058, and for how Gmail sees your domain, Google Postmaster Tools.

A quick reference you can keep

When you are in the middle of editing DNS, a compact summary is easier than a long article. Use this as a reminder.

  • SPF is a TXT record on the domain, starts with v=spf1, exists once only, and stays within ten lookups.
  • DKIM is a TXT (or CNAME) record at selector._domainkey, one per sending service, with a 2048-bit key where possible.
  • DMARC is a TXT record at _dmarc, begins v=DMARC1, and should start at p=none with a reporting address.
  • Alignment means the domain that passes SPF or DKIM matches the domain in the visible From address.
  • Order of work: inventory senders, publish SPF, enable DKIM everywhere, add DMARC at monitor, read reports, fix, then tighten.

Frequently asked questions

Do I need all three records?

Yes, for any domain that sends real mail. SPF and DKIM provide the checks, and DMARC ties them to your visible From address and tells receivers what to do. Large mailbox providers expect all three from bulk senders, and the cost of publishing them is small.

Which should I set up first?

Start with SPF and DKIM, then add DMARC at monitor-only. DMARC depends on the other two, so it makes little sense to publish a policy before they pass.

Will DMARC stop my emails going to spam?

Not by itself. It improves trust and prevents others from forging your domain, but spam placement also depends on content, list quality, complaints and sending history. Think of authentication as a requirement, not a guarantee.

How long do DNS changes take?

Often minutes, sometimes a few hours, occasionally up to a day or two, depending on the record's time-to-live value and your DNS provider. If a check fails right after a change, wait and test again before assuming a mistake.

Can I use p=reject straight away?

It is possible but risky. If any legitimate system fails alignment, its mail will be rejected. Moving through monitor and quarantine first lets you find those systems safely.

What is a DMARC aggregate report?

It is a daily XML summary sent by receiving providers showing how many messages claimed to come from your domain, which servers sent them, and whether they passed SPF, DKIM and DMARC. It is the main tool for finding forgotten or abusive senders.

Do I need these records if I only use a free mailbox?

If you send from an address at a free provider's own domain, such as a standard Gmail address, the provider handles authentication for you. The records matter when you send from your own domain.

Does p=none count as having DMARC for Gmail's rules?

Most summaries of the bulk-sender rules treat a published DMARC record at p=none as the minimum. It satisfies the requirement but gives no protection against forged mail, so use it as the first stage, not the destination. Confirm the current wording on Google's guidelines page.

Can I use more than one DKIM selector on a domain?

Yes, and you should. Each sending service uses its own selector, and rotation relies on having an old and a new one for a short overlap.

Why does forwarded mail fail SPF?

The forwarding server is not listed in your SPF record, and the envelope sender is unchanged, so the check fails at the final destination. DKIM usually survives forwarding, which is why both are needed.

Do I need DMARC on subdomains that never send mail?

A policy on the main domain covers subdomains by default, and the sp= tag lets you set a different one. Many organisations publish a strict policy for unused subdomains, because attackers like to forge names that no one is watching.

How can I tell which service sent a failing message?

Look at the sending IP in the aggregate report and the headers of a failing copy of the message. The IP's owner and the signing domain in the DKIM signature usually identify the service.

The short version

SPF lists who may send for your domain, DKIM signs each message so tampering can be detected, and DMARC ties both to your visible From address and sets the policy. Publish one SPF record, enable DKIM on every service, start DMARC at monitor-only, read the reports, fix whatever fails, and tighten the policy gradually. Test after every change, and keep checking, because the setup that works today can be broken by a new tool next month.

Related reading and tools

Authentication is one layer of a healthy sending setup. The mail routing side is explained in What Does an MX Record Actually Do? A Beginner's Guide, ongoing checks are covered in An Easy Way to Monitor Email Deliverability, and What It Misses, and the list-quality side in How to Bulk Verify an Email List for Free. If you need to test many domains or want continuous checks, the premium plan removes the daily limits. For another free DNS and email toolkit, compare it in our MXToolbox comparison, and find the other utilities on the free tools page.

Check your SPF, DKIM and DMARC records

Try it free