When I first started setting up Google Workspace at my company, I thought, “How hard could it be?” You set up some records, test the inbox, and voilà right? Well… not quite.
It turns out email authentication can feel like decoding a secret language: DKIM, DMARC, SPF, all talking about who can send what, from where, and how the world decides whether your messages are “real.”
After migrating domains to Google’s mail servers, I’ve learned (sometimes the hard way) how these systems fit together, and how to avoid that frustrating “550 5.7.26 Unauthenticated email” error that can derail an entire day.
Let’s break it all down, simply, clearly, and with some good-to-know insights from experience.
Understanding the Core: SPF, DKIM, and DMARC
Before diving into migration, it helps to know what each of these acronyms actually does and why they need to be configured correctly.
1. SPF (Sender Policy Framework)
SPF is like your guest list, it tells other mail servers who’s allowed to send email for your domain.
Example record:
v=spf1 include:_spf.google.com ~all
This means, “Emails coming from Google servers are allowed; everything else, not so much.”
Pro tip: Use ~all (soft fail) while testing, then switch to -all (hard fail) when you’re confident everything’s working.
2. DKIM (DomainKeys Identified Mail)
DKIM is your digital signature, it stamps each outgoing message with a cryptographic key that proves your domain sent it and that it wasn’t tampered with.
When setting up Google Workspace, you’ll generate a DKIM key from your admin console:
Admin Console → Apps → Google Workspace → Gmail → Authenticate email
You’ll get a TXT record that looks something like this:
google._domainkey TXT v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBA...
Add that record to your DNS. After a few hours, go back to the console and click “Start Authentication.”
Good to know:
If you rotate your DKIM key (which Google recommends annually), remember to remove the old DNS record to avoid confusion down the line.
3. DMARC (Domain-based Message Authentication, Reporting, and Conformance)
DMARC is your rule enforcer, it tells receiving servers what to do if an email fails SPF or DKIM.
Example record:
_dmarc TXT v=DMARC1; p=quarantine; rua=mailto:reports@yourdomain.com; ruf=mailto:forensics@yourdomain.com; pct=100
Here’s what it says:
p=quarantine→ If it fails checks, send it to spam.rua→ Send summary reports.ruf→ Send detailed forensic reports.pct=100→ Apply this policy to all messages.
Pro tip: Start with p=none while testing. That way you’ll get reports without blocking anything important.
Migrating to Google Mail Servers (The Right Way)
Now for the fun part, the migration itself. Here’s the checklist and process I’ve refined after helping several teams switch to Google Workspace.
Step 1: Back Up Your Mail
Before changing anything, export mailboxes using your old provider’s export tools (IMAP or PST files).
Step 2: Update DNS MX Records
In your DNS management panel, remove the old MX records and replace them with Google’s:
ASPMX.L.GOOGLE.COM. Priority: 1
ALT1.ASPMX.L.GOOGLE.COM. Priority: 5
ALT2.ASPMX.L.GOOGLE.COM. Priority: 5
ALT3.ASPMX.L.GOOGLE.COM. Priority: 10
ALT4.ASPMX.L.GOOGLE.COM. Priority: 10
After saving, DNS propagation might take 30 minutes to 48 hours depending on your registrar.
Good to know:
You can use tools like dnschecker.org to verify propagation worldwide.
Step 3: Add SPF, DKIM, and DMARC Records
Once your MX records are live, go ahead and add your authentication records.
SPF Example:
v=spf1 include:_spf.google.com -all
DKIM Example:
google._domainkey TXT v=DKIM1; k=rsa; p=MIGfMA0GCSq...
DMARC Example:
_dmarc TXT v=DMARC1; p=none; rua=mailto:dmarc-reports@yourdomain.com
Step 4: Test Everything
Use online tools like:
And send a few test emails to different domains (Gmail, Outlook, Yahoo).
Check your headers — you should see:
spf=pass
dkim=pass
dmarc=pass

Common Mistakes (and How to Avoid Them)
- Forgetting to delete old MX records.
Some mail may still go to your old server if you leave them behind. - Using multiple SPF records.
SPF must be one line only. Combine them if you have multiple senders:v=spf1 include:_spf.google.com include:sendgrid.net -all - Missing “_dmarc” underscore prefix.
Without it, your DMARC record won’t work. - Testing too soon.
DNS changes can take hours. Wait for propagation before panicking. - Not checking your reports.
DMARC reports reveal who’s impersonating your domain. Don’t ignore them!
💡 Final Thoughts
Migrating email servers is part technical, part patience, and part detective work.
When you get that first “DMARC alignment passed” message, it feels like a small victory, because it is.
Setting up SPF, DKIM, and DMARC isn’t just about passing checks, it’s about protecting your reputation and making sure the messages you send reflect the integrity of your organization or brand.
If you’re tackling this migration, take it slow, document each step, and verify as you go.
And remember: everyone gets stumped at least once, but once you figure it out, you’ll never fear a TXT record again.

