Skip to content
SpoofKiller
Protection

How to Prevent Email Spoofing of Your Domain

The practical order of work for stopping others from sending mail as your domain, and the limits of what it prevents.

Reading time
6 min read
Last updated
Updated
A lighthouse casting a yellow beam across a sea of envelopes, two of them red.
You cannot stop people from trying your name. You can arrange for someone to be watching when they do.
In this guideShow 8 sections

The first most companies hear of it is a phone call. A customer would like to know why she has been asked, on what appears to be your letterhead, to pay an invoice into a bank account in a country where you do not do business. The email came from your domain. It has your logo, your sign-off, and a plausible grasp of your invoice numbering. You did not send it, and until this moment you did not know that anyone else could.

They could because your domain never told the world’s mail servers otherwise. The good news is that it can, with a handful of DNS records and some patience. The work has an order, and doing it out of order is how people bounce their own payroll notices. Here is the order.

Why spoofing your domain is so easy

Email’s transport protocol does not verify the sender. The From address is whatever the sending software says it is. Forging one requires no access to your systems, no stolen password, and no particular talent; it is a configuration field.

What stops it is a published policy that receivers can check. That policy is DMARC, and it rests on two authentication methods, SPF and DKIM. Receivers do the enforcing: you publish, they check, and mail that fails is filtered or refused on their end. If the three acronyms are new, SPF vs DKIM vs DMARC explains who does what. If you only want the steps, read on.

Step 1: Find out who sends mail as you

Before you forbid anyone from using your domain, establish who is using it with permission. The list is always longer than expected. There is the company mail system, of course. Then the newsletter platform, the invoicing tool, the help desk, the CRM, the web server that sends password resets, the scanner on the third floor, and whatever the marketing department signed up for in the spring.

Start with a domain health check to see which records already exist. Then ask around, and check which services your current SPF record names. You will not find everything this way. That is expected; step 4 catches the rest.

Step 2: Make your legitimate mail provable

Publish one correct SPF record

SPF lists the servers allowed to send for your domain. You need exactly one record, it must stay within ten DNS lookups, and it should end in ~all or -all:

example.com.  TXT  "v=spf1 include:_spf.google.com include:spf.protection.outlook.com -all"

Substitute the includes your own providers document. The SPF record generator assembles them into a single record, and the SPF checker counts the lookups.

Turn on DKIM at every sender

DKIM signs each message with a key tied to your domain. For every service on your list, find the setting usually labeled “domain authentication” or “DKIM,” add the DNS records it gives you, and confirm that it now signs as your domain, not its own. This matters more than SPF: an aligned DKIM signature survives forwarding, and it is the only way most third-party services can pass DMARC at all. Provider-specific steps are in the setup guides, including Google Workspace and Microsoft 365.

Step 3: Publish DMARC in monitoring mode

Now add the DMARC record, with a policy that changes nothing yet:

_dmarc.example.com.  TXT  "v=DMARC1; p=none; rua=mailto:dmarc@example.com"

p=none asks receivers to deliver everything as before and to send daily aggregate reports to the rua address. These reports are the point of this step. They list each IP address that sent mail with your domain in the From line, how much, and whether it passed. They contain no message content. Build the record with the DMARC generator, or follow the full configuration guide.

Step 4: Read the reports and fix what fails

Give it two to four weeks, long enough for the monthly senders to show themselves. Then sort every source in the reports into one of three piles.

What you seeWhat it usually isWhat to do
A known service, passingCorrectly configured senderNothing
A known service, failingYours, but signing as its own domain or missing from SPFEnable DKIM with your domain at that service
A mailbox provider’s IPs, SPF failing, DKIM passingYour mail being forwarded by recipientsNothing; DKIM is carrying it
An unknown source, failing everythingA forgotten system, or someone impersonating youInvestigate. If it is not yours, enforcement will handle it

A caution: a failure is not proof of fraud. Forwarding and mailing lists produce failures from entirely honest mail. The work is in telling the piles apart, and it is tedious to do from raw XML. The DMARC report analyzer reads a single report for free. SpoofKiller’s spoofing detection does the sorting continuously, labeling each source as a known sender, likely forwarding, or likely impersonation, with the evidence shown.

Step 5: Enforce, in stages

When every sender you recognize is passing, raise the policy. First to quarantine, which sends failures to spam:

v=DMARC1; p=quarantine; pct=25; rua=mailto:dmarc@example.com

The optional pct tag applies the policy to a fraction of failing mail, so a mistake costs a quarter of what it otherwise would. Raise it to 100 as the reports stay quiet, then move to the policy that actually closes the door:

v=DMARC1; p=reject; rua=mailto:dmarc@example.com

At p=reject, receivers that honor DMARC refuse mail that uses your exact domain without authenticating as you. The forged invoice from the opening paragraph does not reach the customer’s inbox at those receivers. The staged plan, with the checks before each move, is in how to reach p=reject.

Monitoring tells you that you are being impersonated. Only enforcement does anything about it.

Step 6: Lock the doors you are not using

Forgers prefer the unwatched. Every domain you own that sends no mail, the old brand, the defensive registration, the .net you bought to keep it from someone else, should say so explicitly:

parked-example.com.         TXT  "v=spf1 -all"
_dmarc.parked-example.com.  TXT  "v=DMARC1; p=reject"

Check subdomains too. They inherit your main DMARC policy unless the record’s sp tag says otherwise, so make sure nobody has left sp=none in place.

What this prevents, and what it does not

It would be pleasant to end there. But DMARC addresses one kind of impersonation, forgery of your exact domain, and criminals are not obliged to cooperate.

  • Lookalike domains. Someone registers a domain one letter away from yours and sends from it, fully authenticated. Your DMARC record has no say over a domain you do not own. The defenses are watching for new registrations that resemble yours, which domain security monitoring does daily, registering the obvious variants yourself, and reporting abusive ones to their registrars.
  • Display-name tricks. The From name says “Your Company Accounts” over an unrelated webmail address. No DNS record touches this. Mail clients that show the full address help; so do recipients who look at it.
  • Compromised accounts. If an attacker logs in to a real mailbox, his mail is authentic. Multi-factor authentication and sign-in alerts are the controls that apply.
  • Receivers that do not check. Enforcement depends on the receiving server honoring DMARC. The major mailbox providers do. A small, old mail server somewhere may not.

Add one control that is not technical at all: a rule that changes to payment details are confirmed by telephone, using a number already on file. It defeats every variety above, and it costs nothing. The fuller map is in domain impersonation protection.

Then keep watching. Authentication decays: a new tool gets adopted without DKIM, a provider changes its SPF record, a selector is deleted in a DNS cleanup. The reports will show it if someone reads them. If you would like that someone to be software, one domain is free, and the plans are listed here.

FAQ

Questions about How to Prevent Email Spoofing

Short answers to what readers ask next. If yours is missing, write to us and a person will reply.

Ask a question

Free, no obligation

Want a second pair of eyes on your records?

Send us your domain. We will look at its DMARC, SPF, and DKIM setup and write back, in plain English, with what we found and what to fix first.

  • A person reads your records, not a script
  • Specific fixes, in order of importance
  • No sales sequence afterward

We use your details to reply. Nothing else.

Reading about it is the slow way.

Run the free check and see your own domain's DMARC, SPF, and DKIM in the time it took to read this paragraph. No account, no card.