Set up SPF, DKIM, and DMARC step by step
These three DNS records prove your email is real. Set them up once, test, and leave them. This guide assumes your domain uses Barbrick's nameservers. If it does not, see the last section.
Before you start
- Confirm your nameservers. Run
dig +short NS example.ca. You should seegordon.barbrick.ca,hugh.barbrick.ca,douglas.barbrick.ca. - Make a list of every service that sends email as
@example.ca. Typical ones are your mailboxes, your website forms, a newsletter tool, an invoicing tool, and Microsoft 365 or Google Workspace.
Step 1: Check what you have
- Go to Account → Hosting → your site → Email and open the Deliverability tab.
- Find the Sender authentication card for
example.ca. - Check the status for SPF, DKIM, and DMARC. Valid shows a green check.
If a row shows a problem, select Fix it. We add the correct record to DNS.
See Check your setup with Deliverability.
Step 2: SPF
- If Fix it installed an SPF record, check it. It starts like this, followed by an
include:for our outgoing mail relay. Keep that include.
example.ca. 3600 IN TXT "v=spf1 +a +mx +ip4:203.0.113.25 ~all"
- Add other senders by editing the same record. Do not add a second one. Examples:
| Service | Add to the record |
|---|---|
| Microsoft 365 | include:spf.protection.outlook.com |
| Google Workspace | include:_spf.google.com |
| Newsletter or invoicing tool | The include: the tool gives you |
Result for Barbrick mailboxes and Microsoft 365:
example.ca. 3600 IN TXT "v=spf1 +a +mx +ip4:203.0.113.25 include:spf.protection.outlook.com ~all"
- Save. Keep to 10 DNS lookups. See SPF.
Step 3: DKIM
- In Deliverability, find the card for your domain.
- Check DKIM shows a record. If not, select Fix it.
- For other services, follow their guide and add the CNAME or TXT records they give.
See DKIM.
Step 4: DMARC
- Open Account → Hosting → your site → DNS for
example.ca. - In Add a record, set Type to TXT.
- Set Name to
_dmarc. - Set the value to this:
v=DMARC1; p=none; rua=mailto:[email protected]
- Click Add record.
- Create the mailbox
[email protected]to receive reports. See Create an email account.
Start with p=none. Move to quarantine and reject over several weeks. See DMARC.
Step 5: Test
- Send a message to a Gmail address you control.
- Open it. Choose the three dots, then Show original.
- Look at the top.
SPF: PASS with IP 203.0.113.25
DKIM: 'PASS' with domain example.ca
DMARC: 'PASS'
All three should pass. Also test from each service that sends as your domain.
Command-line check:
dig +short TXT example.ca | grep spf
dig +short TXT default._domainkey.example.ca
dig +short TXT _dmarc.example.ca
Step 6: Add each new sender before it sends
Whenever you start a new service that sends as @example.ca, update SPF and set up its DKIM first.
If your DNS is not at Barbrick
Copy the records into your DNS provider. To get the DKIM value, open a request and we will send it, usually the same day. See Keep DNS somewhere else.
If something goes wrong
| Symptom | Fix |
|---|---|
spf=permerror |
Two SPF records, or over 10 lookups |
dkim=none |
DKIM not installed or message sent through another server |
dmarc=fail |
SPF or DKIM passes but does not align with the From address |
| A record "conflicts" | An existing record with the same name. Edit it. |
Still stuck? Ask us and we'll walk you through it.
