Skip to content

Guide

How to set up SPF, DKIM, and DMARC

Three DNS records decide whether Gmail and Outlook trust your mail. Here is what each one does and how to publish it.

Updated · By Infinoid Technologies Private Limited

In short

SPF, DKIM, and DMARC are DNS records that prove your email is really from your domain. SPF lists the servers allowed to send for you, DKIM adds a cryptographic signature, and DMARC tells receivers what to do when SPF or DKIM fails and where to send reports. Gmail, Yahoo, and Outlook.com now require them for bulk senders.

Step by step

  1. 01

    Publish one SPF record

    Add a TXT record on your domain. Google Workspace: v=spf1 include:_spf.google.com ~all. Microsoft 365: v=spf1 include:spf.protection.outlook.com -all. Combine includes into a single record if you use several senders, and stay under SPF’s 10 DNS-lookup limit.

  2. 02

    Turn on DKIM signing

    Google Workspace: Admin console → Apps → Google Workspace → Gmail → Authenticate email, generate a key, publish the TXT record (default selector “google”), then click Start authentication. Microsoft 365: publish the two CNAME records (selector1 and selector2) shown in the Microsoft Defender portal, then enable DKIM for the domain.

  3. 03

    Add a DMARC record

    Add a TXT record at _dmarc.yourdomain.com, for example: v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com. Start with p=none to collect reports without affecting delivery.

  4. 04

    Check alignment

    DMARC passes when the From domain matches the domain that passed SPF or DKIM. Sending from your own Google or Microsoft mailbox with DKIM enabled normally aligns.

  5. 05

    Tighten the policy

    After reports show your legitimate mail passing, move DMARC to p=quarantine and later p=reject to stop others spoofing your domain.

Verify in Infiara

Add your sending domain on the Domains page in Infiara and click Verify DNS. Infiara shows which of SPF, DKIM, and DMARC are found, so you can fix gaps before launching a campaign.

Questions

Frequently asked questions

Can I have two SPF records?

No. A domain must have only one SPF TXT record; two records cause SPF to fail. Merge them into one record with multiple include mechanisms.

How long do DNS changes take?

Usually minutes to a few hours, depending on the record’s TTL and your DNS host, and occasionally up to 48 hours.

More from Infiara

Keep reading

All guides →

Infiara Where Intelligence Meets Reach.

Turn every inbox into a pipeline.

Connect a mailbox. Import a list. Write once. Launch. Let the inbox turn replies into work.