EMAIL SECURITY

SPF, DKIM and DMARC: stop people sending email as you

Without these three DNS records, anyone can send email that appears to come from your domain. Here is what each one does and how to set them up.

If your domain has no email protection, anyone can send a message that appears to come from you@yourcompany.com. Three DNS records stop that: SPF, DKIM and DMARC. Our scanner checks SPF and DMARC, and we set all three up on our own domains.

SPF: who may send

An SPF record lists the services allowed to send email for your domain, such as Google Workspace, Zoho or Microsoft 365, plus any newsletter or helpdesk tool. It is a single TXT record, for example:

v=spf1 include:_spf.google.com ~all

Keep exactly one SPF record. Two SPF records break SPF for the whole domain.

DKIM: a signature on every email

DKIM adds a digital signature to each message. Your email provider gives you a DNS record to publish, and then signs your outgoing mail so receivers can check it was not forged or altered. Turn it on in your provider's admin panel; it usually takes a few minutes.

DMARC: what to do with fakes

DMARC tells receiving servers what to do when a message fails SPF and DKIM, and where to send reports. Publish it as a TXT record at _dmarc.yourcompany.com:

v=DMARC1; p=none; rua=mailto:dmarc@yourcompany.com

Start with p=none, which only monitors. After a week or two of reports showing your real email passes, move to p=quarantine, which sends forgeries to spam, and later p=reject.

Domains that never send email

If you own a domain that should never send mail, publish v=spf1 -all and v=DMARC1; p=reject; so nobody can use it to impersonate you.

Check your domain

Run a free website scan: the report shows your email provider, whether SPF and DMARC are present, and what to fix.

Check your own website or code for these problems.

Run a free security scan Ask us to review it

More from the blog

AI-WRITTEN CODE

Supabase Row Level Security: the setting that protects your data

Apps built quickly with AI tools often ship with Row Level Security switched off. Here is why that exposes every row, and how to fix it.

Read the article

WEBSITE SECURITY

How to read your free security scan report

Your scan report gives a score, findings by severity and evidence for each one. Here is what each part means and what to fix first.

Read the article

AI-WRITTEN CODE

Five security mistakes that are common in AI-written code

AI assistants write working code fast, but working is not the same as safe. Five common mistakes, how to spot them in your own code and how to fix each one.

Read the article
Let’s chat