← Back to Guides

Guide · Deliverability

How to set up SPF, DKIM and DMARC for a cold email domain

Three records, about fifteen minutes, done once per domain. The exact values and where to paste them.

An old key on a plain background
Written by
Ramy Karras
Updated
27 Nov 2026
Reading time
3 minutes

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.

RecordWhere it goesWhat it says
SPFYour domain itself (host @)These servers may send email for this domain
DKIMselector._domainkeyHere is the key that proves an email really came from us
DMARC_dmarcIf 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 hostWhere to clickName for the root domain
CloudflareDNS, Records, Add record, Type TXT, Save@
GoDaddyDomain Portfolio, your domain, DNS, Add New Record, Type TXT, Save@
NamecheapDomain List, Manage, Advanced DNS, Add new record, TXT Record, Save all changes@
From each host's own help page. GoDaddy and Namecheap both say to leave the domain out of the Name or Host field; for DMARC, the Name is just _dmarc.

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 fromSPF record
Google Workspace inboxesv=spf1 include:_spf.google.com ~all
Your own dedicated IPv=spf1 ip4:203.0.113.10 -all (your IP in place of the example)
Bothv=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.

  1. 1Generate the key in your sending service (in Google Workspace: Admin console, Apps, Google Workspace, Gmail, Authenticate email).
  2. 2Copy the host name, for example google._domainkey, and the long value.
  3. 3Add it as a TXT record at your DNS host, with only the host name in the Name field.
  4. 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.

StageDMARC record
Startv=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
Once reports look cleanv=DMARC1; p=quarantine; rua=mailto:dmarc@yourdomain.com
rua is where receivers send daily reports. Use an address you read, or a free DMARC report tool.

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.

  1. 1Look up all three with a free record checker and fix anything missing or doubled.
  2. 2Send one email to a Gmail address you own.
  3. 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.

Frequently asked questions:

Yes, cold email needs SPF, DKIM and DMARC. Google requires SPF or DKIM from every sender, and SPF, DKIM and DMARC from anyone sending 5,000 or more emails a day to Gmail.

No, a domain cannot have two SPF records. Two SPF records make the check fail. Combine every sending service into one record.

A new cold email domain should start with p=none so nothing is blocked while you read the reports. Google accepts none for bulk senders. Move to quarantine once your mail passes consistently.

New DNS records usually work within an hour. GoDaddy says it can take up to 48 hours to update everywhere, and Namecheap says normally about 30 minutes.

Icon

Still have questions?

Have a question about MailRig, your setup, or switching over? We’re happy to talk it through with you.

MailRig

Send 10,000 cold emails a day without renting a single inbox.

Your own dedicated IPs on isolated sending infrastructure, provisioned and warmed for you. One flat price.