What do SPF, DKIM and DMARC do?#
SPF lists the servers allowed to send for your domain, DKIM signs each email so it cannot be changed on the way, and DMARC tells receivers what to do when either check fails.
| Record | Where it goes | What it says |
|---|---|---|
| SPF | Your domain itself (host @) | These servers may send email for this domain |
| DKIM | selector._domainkey | Here is the key that proves an email really came from us |
| DMARC | _dmarc | If a check fails, do this, and send reports here |
SPF, DKIM, DMARC and rDNS explained goes deeper on why each one matters.
How do you add a TXT record at your DNS host?#
You add a DNS record by opening your domain's DNS settings, adding a record of type TXT, putting the host name in Name or Host and the record in Value, then saving. Never type your domain into the Name field.
| DNS host | Where to click | Name for the root domain |
|---|---|---|
| Cloudflare | DNS, Records, Add record, Type TXT, Save | @ |
| GoDaddy | Domain Portfolio, your domain, DNS, Add New Record, Type TXT, Save | @ |
| Namecheap | Domain List, Manage, Advanced DNS, Add new record, TXT Record, Save all changes | @ |
Changes usually take effect within an hour. GoDaddy says it can take up to 48 hours to update everywhere.
How do you set up SPF?#
You set up SPF by adding one TXT record on the root domain listing every service that sends for it. A domain can have only one SPF record, so add services to the same line.
| If you send from | SPF record |
|---|---|
| Google Workspace inboxes | v=spf1 include:_spf.google.com ~all |
| Your own dedicated IP | v=spf1 ip4:203.0.113.10 -all (your IP in place of the example) |
| Both | v=spf1 ip4:203.0.113.10 include:_spf.google.com ~all |
- Keep one SPF record per domain. Two records make both fail.
- Stay within 10 DNS lookups. The SPF standard caps each check at 10, and every include counts; past that, SPF fails.
How do you set up DKIM?#
You set up DKIM with the key your sending service creates: it gives you a TXT record to paste. The host name is a selector followed by ._domainkey, and the value starts with v=DKIM1.
- 1Generate the key in your sending service (in Google Workspace: Admin console, Apps, Google Workspace, Gmail, Authenticate email).
- 2Copy the host name, for example google._domainkey, and the long value.
- 3Add it as a TXT record at your DNS host, with only the host name in the Name field.
- 4Turn signing on in the sending service once the record is live.
How do you set up DMARC?#
You set up DMARC by adding a TXT record named _dmarc. Start with a policy of none, which Google accepts for bulk senders, and move to quarantine once reports show your mail passing.
| Stage | DMARC record |
|---|---|
| Start | v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com |
| Once reports look clean | v=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com |
How do you check the records are working?#
You check the records work by looking them up with a record checker, then send a test email to a Gmail address and open its original headers. SPF, DKIM and DMARC should each say PASS.
- 1Look up all three with a free record checker and fix anything missing or doubled.
- 2Send one email to a Gmail address you own.
- 3Open it and choose Show original. Gmail lists SPF, DKIM and DMARC with PASS or FAIL.
Check again whenever you add a sending tool. A new tool that is missing from SPF is the most common reason a working domain starts failing.
How does MailRig handle these records?#
MailRig shows the exact records for each of your domains, ready to paste, and checks they pass before anything sends.
Reverse DNS and encryption on the sending side are set up for you on your dedicated IP. How the infrastructure works.

