Email authentication proves that a message really came from your domain. Without it, mailbox providers like Gmail, Yahoo, and Microsoft increasingly send your mail to spam or reject it outright. Setting it up means publishing four DNS records — and the exact values depend on who sends your mail and who hosts your DNS.
The four records you publish
SPF is a TXT record that lists the servers allowed to send mail for your domain, such as v=spf1 include:_spf.google.com ~all. A receiver checks the connecting server against it. See what a TXT record is for the format, and check yours with the SPF checker.
DKIM attaches a cryptographic signature to every message. You publish a public key in DNS — as a TXT record or, on some providers, a CNAME — and your provider signs outgoing mail with the matching private key. The record lives at selector._domainkey.yourdomain.com. Verify a published key with the DKIM checker, or build one with the DKIM record generator.
DMARC is a TXT record at _dmarc.yourdomain.com, such as v=DMARC1; p=none; rua=mailto:reports@yourdomain.com. It ties SPF and DKIM to the visible From address and tells receivers what to do when neither aligns — monitor, quarantine, or reject. Read the DMARC record you have, and start at p=none while you watch the reports.
MX records route inbound mail to your provider's servers. They are not authentication, but they are part of the same setup and your provider gives you the exact hosts. Check them with the MX lookup.
If you want the mechanics of how these three checks combine, read email authentication explained. The rest of these guides are about doing it on a specific provider.
Choose your provider
The records above are the same everywhere, but where you enable DKIM and the exact values you publish differ. Pick your mailbox provider — and, if it is different, your DNS host:
- Google Workspace — generate the DKIM key in the Admin console and publish one
google._domainkeyTXT record. - Microsoft 365 — enable DKIM in the Defender portal and publish two selector CNAMEs.
- Gmail — what applies for a
@gmail.comaddress versus a custom domain on Google. - Namecheap — where to add the records your mailbox provider gave you in the Advanced DNS panel.
- GoDaddy — the same, in the GoDaddy DNS manager.
Your mailbox provider (who sends your mail) and your DNS host (who answers DNS for your domain) can be two different companies. You get the record values from the first and publish them at the second.
Check before and after
Before you change anything, and again after DNS propagates, run a free check from the Relaymetry home page: enter your domain and it reads your live SPF, DKIM, DMARC, and MX records in one pass and flags what is missing or misconfigured. DNS changes can take up to a day to propagate, so if a record does not show up immediately, wait and check again rather than re-adding it.