Stop people sending email as your business: SPF, DKIM and DMARC
Three DNS records tell every mail server which senders are really you: SPF, DKIM and DMARC. Publish them in that order, read the reports, then tighten DMARC until forgeries are refused. The records are free. This page shows how to check what your domain publishes today and how to reach enforcement without bouncing your own mail.
Why this one comes first
Faking your domain in an email takes no hacking. Your domain’s records are public. If they say nothing about who may send as you, a receiving mail server has little basis for treating a forged message differently from a real one.
- The victim is usually not you. It is your customer paying a fake invoice, or your bookkeeper acting on a request that appears to come from the owner.
- There is nothing to notice on your side. No login, no malware, no alert. The sender never touches your systems.
- You may hear about it late, for example when a customer asks why they were invoiced twice.
Check what your domain publishes right now
On Windows, open Command Prompt. On a Mac, open Terminal. Type each line, replacing yourdomain.com with your own domain. These commands only read public records; they change nothing.
nslookup -type=txt yourdomain.com nslookup -type=txt _dmarc.yourdomain.com
- First command: look for a line beginning
v=spf1. That is your SPF record. No such line means you have none. Two such lines is an error; there must be exactly one. - Second command: look for a line beginning
v=DMARC1. That is your DMARC record. Read thep=value:none,quarantineorreject. No record at all means no DMARC. - DKIM cannot be looked up this way without knowing your provider’s selector name. The easier check: send an email from your business address to a Gmail account, open it there, and choose “Show original”. Gmail shows whether SPF, DKIM and DMARC each passed.
The three records, and what each one does
SPF: who is allowed to send
A TXT record on your domain listing the services permitted to send mail as you. Your email provider publishes the exact include: line to use. Every other tool that sends on your behalf (the CRM, the invoicing system, the newsletter, the booking form) has its own.
v=spf1 include:_spf.example-provider.com ~all
The ending matters. ~all is a soft fail: “anything else is probably not us.” -all is a hard fail: “anything else is not us.” You start at ~all and finish at -all.
The trap: the SPF standard (RFC 7208) limits a record to ten DNS lookups, and every include: uses at least one. A business that keeps adding sending tools can go over the limit without noticing. Past ten, receivers treat the record as broken, so a record that looks fine is giving no protection.
DKIM: a signature that proves it
A cryptographic signature added to each message you send, with the public half published in DNS. You cannot copy this one from a guide. Your email provider generates the key in its admin settings and gives you the record to publish. Turn it on there first, then publish what it gives you. Do the same inside each other tool that sends as you.
DKIM usually survives forwarding, which SPF often does not. That is why both exist.
DMARC: the instruction, and the reporting
A TXT record at _dmarc.yourdomain.com that ties the other two together, tells receiving servers what to do with mail that fails, and asks them to send you reports.
v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
| Policy | What a receiving server does with a forgery | What it risks |
|---|---|---|
p=none | delivers it, and reports it to you | nothing; the safe first step |
p=quarantine | puts it in the spam folder | a real sender you forgot lands in spam |
p=reject | refuses it | a real sender you forgot bounces |
p=none means you are watching people forge your email, not stopping them. It is the right place to start and the wrong place to stay.
A DMARC record with no rua= address collects nothing. You get the weakness of p=none without the reports that justify it.
The safe order, and why the waiting matters
- Publish SPF ending in
~all, and switch DKIM on. Neither blocks existing mail. - Publish DMARC at
p=nonewith a reporting address. This also blocks nothing. You are now collecting evidence. - Read the reports for two to four weeks. They arrive as XML files. A free DMARC report reader turns them into a plain list of who is sending as you and whether each passed. This is where forgotten sending tools turn up.
- Fix each real sender that fails: add it to SPF, or enable DKIM inside that tool.
- Move to
p=quarantine. Watch for another couple of weeks. - Move to
p=reject, and change SPF’s~allto-all.
Step 6 is the one that stops forgeries. Steps 1 to 5 exist so that step 6 does not bounce a real invoice. Publishing p=reject on day one is correct in theory and risky in practice, because the cost lands on your own quotes and invoices not arriving.
Often missed: who is allowed to receive your reports
If your DMARC record sends reports to an address at a different domain (an agency or a monitoring service), that other domain has to publish a record saying it accepts them. Without it, receivers may not send the reports.
The failure is silent. The record looks right, the inbox stays empty, and it is easy to conclude there is nothing to see. If you have had a reporting address for weeks and received nothing, check this before moving to enforcement.
What this does not fix
A lookalike domain. If someone registers yourbusiness-invoices.com and emails your customers from it, your DMARC policy has no say, because it is not your domain. The defense is telling customers in advance what you will and will not ask for by email.
A stolen mailbox. If someone is sending from inside your real email account, every check on this page passes, because the mail really is from you. That is a password and multi-factor authentication problem, not a DNS one.
Email records are one item on the security basics checklist. If you build your own tools that send email, as owners do in our AI classes, add each new sending tool to SPF and DKIM before it sends its first message. Stuck on a step? Email solutions@ikonic303.dev.
FAQ
I already have SPF. Am I protected from spoofing?
Probably not fully. SPF alone does not tell a receiving server what to do with a failure, and it often fails on forwarded mail. Without DMARC at an enforcing policy, each receiver decides for itself.
Will p=reject bounce my real email?
It will bounce any real sender that is not yet passing, which is why the weeks of reports at p=none come first. Done in order, enforcement should be uneventful.
How long does the whole thing take?
Publishing the records is a short job once you have your DNS login. Reaching enforcement safely takes several weeks, and almost all of that is waiting for reports.
Where do I add these records?
In the DNS settings for your domain, which are usually at the company where you bought the domain or the one that hosts your website. Your email provider’s help pages give the exact values for SPF and DKIM.
Do I need this if I only send a few emails a day?
Yes. The records protect your name from being used by others, which has nothing to do with how much mail you send yourself.
What strangers can see about your business · Website security headers · Security questionnaires · Back to security
Get in touch
Email solutions@ikonic303.dev to get the next AI class date, to talk about marketing, or about one AI tool or job you want built. ikonic303 is based in Colorado, and classes are held in the Denver metro.
ikonic303 home · AI classes · what we built · free Anthropic courses · contact