Your emails are going out, but some land in spam. Or a customer asks why they got a strange email “from” your business that you never sent. Both problems usually have the same cause: your domain has no email authentication set up.
SPF, DKIM, and DMARC are three records you add to your domain’s DNS settings. They prove to Gmail, Outlook, and other mailbox providers that an email really came from you — and they stop others from sending fake emails in your name. They sound technical, but they are not that bad.
First, what is DNS?
DNS is the settings page for your domain, usually at your domain registrar or hosting provider. To set up authentication you will add three TXT records there — each one is just a line of text, and your email tool will give you the exact values to paste.
SPF: who is allowed to send for you
SPF stands for Sender Policy Framework. It is a list, published in your DNS, of the servers and services allowed to send email using your domain. When a mailbox provider gets an email from your domain, it checks the sending server against your list. If the server is on the list, the check passes. If not, it fails. An SPF record looks something like this: v=spf1 include:_spf.google.com -all — that line says: version SPF 1, allow Google’s mail servers, and fail everything else. Your own record will list the services you actually use — copy the exact line from your email tool’s setup page, not from someone else’s guide. Three rules matter for SPF: You can only have one SPF record per domain. If you add a second one, receivers may ignore both. If you use two sending services, combine them into a single record with two include: entries. There is a limit of 10 DNS lookups. Each include: counts toward it. Most small businesses never hit this. -all means “fail everything not listed”, while ~all means “soft fail” — treat unlisted senders as suspicious but don’t reject them. Most guides recommend -all once you are sure your list is complete.
DKIM: a signature that proves the email wasn’t changed
DKIM stands for DomainKeys Identified Mail. It works like a wax seal on a letter. Your sending service signs every outgoing email with a private key that only it holds, and publishes the matching public key in your DNS. When a mailbox provider receives the email, it checks the signature against the public key. If they match, the email has not been tampered with on the way. The public key lives in a TXT record under a special name, usually something like s1._domainkey.yourdomain.com. The s1 part is called a selector — just a label your sending service picks. Sometimes the service asks you to add a CNAME record instead, pointing to a key they manage. Either way, you copy the values from your sending service’s setup page. Two things worth knowing: DKIM survives forwarding. SPF often fails on forwarded mail, because the forwarding server is not on your SPF list — but the DKIM signature travels inside the message, so it still checks out. And each sending service has its own DKIM key, so if you send mail from two tools, set up DKIM in both, using different selectors.
DMARC: the rulebook that ties it together
DMARC stands for Domain-based Message Authentication, Reporting and Conformance. It is the instruction you give mailbox providers about what to do when SPF or DKIM fails — and it asks them to send you reports about it. The DMARC record is a TXT record at _dmarc.yourdomain.com, and a basic one looks like this: v=DMARC1; p=none; rua=mailto:reports@yourdomain.com — here is what the parts mean: v=DMARC1 — the version, always the same. p=none — the policy. none means “do nothing, just send me reports.” The other options are quarantine (send failed mail to spam) and reject (block it completely). rua=mailto:reports@yourdomain.com — where providers send their aggregate reports. DMARC also adds one more check: alignment. It is not enough for SPF or DKIM to pass on some other domain — at least one must match the domain people see in the From line. That is how DMARC stops someone from sending mail that passes checks for their own domain but shows your name in the From field.
The setup order that works
Don’t try to set up all three at once. Follow this order: Step 1: List everything that sends email for you. Your mailbox provider, your email marketing tool, your website’s contact form, your invoicing tool — anything that sends mail with your domain in the From line. Missing one is the most common cause of authentication problems. Step 2: Publish your SPF record. Add the include: entries for every service on your list, then publish the record in DNS. DNS changes can take a few minutes to a few hours to spread. Step 3: Turn on DKIM at every sender. Enable signing in each tool, publish the key it gives you, and verify it in the tool’s dashboard. Step 4: Add DMARC with p=none. This changes nothing about delivery — it only switches the reports on. Leave it at p=none for a couple of weeks and read the reports. A widely shared piece of advice is to have SPF and DKIM working for about 48 hours before you add DMARC, so the DNS records have time to spread. Step 5: Tighten the policy slowly. Once the reports show everything passing, move to p=quarantine, wait another week or two, and then move to p=reject.
How to check your work
After you add each record, check it. Free online DNS checkers can show you whether your SPF, DKIM, and DMARC records are visible and correctly written — search for “SPF record checker” or “DMARC checker” and paste your domain. Your email tool’s settings page will usually show a green tick once each check passes. You can also send a test email to a Gmail address and look at the message details — Gmail shows whether SPF, DKIM, and DMARC passed. If all three say “PASS”, you are done.
Common mistakes
Two SPF records. Only one is allowed. Combine everything into a single record. Copying example records from a guide. The include: values in examples belong to someone else’s provider. Your records must come from your own sending services. Jumping straight to p=reject. If anything on your sender list is missing from SPF or DKIM, reject will block your own real emails. Start with p=none, read the reports, then tighten. Forgetting the website contact form. Forms, order notifications, and password resets send email too. If they use your domain, they need to be in SPF or signing with DKIM. Setting it up once and never looking again. Every time you add a new tool that sends email, update your SPF record and turn on DKIM for it.
Do you need all three?
Yes. SPF alone can be broken by forwarding. DKIM alone doesn’t tell receivers what to do when a check fails. DMARC without SPF and DKIM has nothing to check. Together they cover each other’s weak spots, and Gmail and Yahoo now require SPF and DKIM for bulk senders.
What’s next?
Authentication proves your emails are really from you. The next step is building your sending reputation — because even authenticated mail from a brand-new domain starts with no history. In the next post, we’ll go through how to warm up a new email domain.
Written with AI assistance and reviewed by Amir Hameed