Article

Content

DNS Templates for Google Workspace and Microsoft 365 (2026)

DNS Templates for Google Workspace and Microsoft 365 (2026)

DNS Templates for Google Workspace and Microsoft 365 (2026)

Summarize with
Book more meetings with pre-warmed mailboxesReady-to-send Google & Microsoft inboxes in 5 minutes. US/EU IPs. No warmup wait.Get pre-warmed inboxes
4.8on G2
4.5on Trustpilot
Add as a preferred source on Google
Table Of Contents

Scanning page for headings…

Setting up DNS for one email domain is easy to get right. Setting it up for thirty is easy to get wrong — one copied DKIM record or a second SPF record and a domain silently fails authentication. Reusable DNS templates for Google Workspace and Microsoft 365 solve that: a standard set of records with clearly marked parts that change per domain. This guide gives you both templates, explains which values are constant and which are unique, how to apply templates at scale, and how to verify every domain afterwards.

Stop Losing Emails to Spam — Get Pre-Warmed Inboxes
Ready to send from day 1. No warm-up wait. No extra tools needed.
Find Your Sending Domains →
100,000+ mailboxes · US & EU IPs · From $4.99/inbox

Thirty Domains, One Missing DKIM Record

💡 TL;DR

Build DNS templates for Google Workspace and Microsoft 365 that separate constants (MX hosts, SPF includes, autodiscover, DMARC format) from per-domain values (verification tokens, DKIM keys or CNAME targets, and Microsoft's domain-specific MX host). Publish exactly one SPF record per domain, never copy DKIM between domains, start DMARC at p=none with reporting, and verify each domain with DNS lookups and a test message before sending.

An agency sets up thirty outreach domains over two days. To save time, someone copies the DNS records from the first domain into the rest. MX, SPF, and DMARC work fine everywhere. DKIM fails on twenty-nine of them — because DKIM keys are generated per domain, and the copied record belongs to domain one. Replies slow, and nobody notices the cause for a week.

A template would have prevented it. Not a copy-paste of finished records, but a pattern that says exactly which values stay the same and which must be fetched fresh for each domain.

By the end of this, you'll have DNS templates for Google Workspace and Microsoft 365 you can reuse safely for every new domain. For the reasoning behind each record, see our SPF, DKIM, and DMARC guide.

Stop Losing Emails to Spam — Get Pre-Warmed Inboxes
Ready to send from day 1. No warm-up wait. No extra tools needed.
Find Your Sending Domains →
100,000+ mailboxes · US & EU IPs · From $4.99/inbox

What a DNS Template Is — and Isn't

A DNS template is a list of records with placeholders for anything that's unique to a domain. It is not a finished set of records you copy everywhere.


Part of the template

Same for every domain?

Examples

Constants

Yes

Google MX host, SPF includes, Microsoft autodiscover target, DMARC format

Per-domain values

No — fetch for each domain

Verification tokens, DKIM public keys or CNAME targets, Microsoft 365 MX host

Your choices

Usually yes, by policy

DMARC policy level and reporting address, SPF qualifier (~all or -all)


Write the template with placeholders like {DOMAIN}, {VERIFY_TOKEN}, and {DKIM_VALUE}, and keep a short note next to each one saying where the value comes from.

Need pre-warmed inboxes ready today? Litemail delivers Google Workspace & Microsoft 365 mailboxes with weeks of warm-up history built in.Check Available Domains →

Google Workspace DNS Template


Type

Host / Name

Value

Constant or per-domain

TXT (verification)

@

google-site-verification={VERIFY_TOKEN}

Per-domain

MX

@

smtp.google.com (priority 1) — or Google's older five-record aspmx set

Constant

TXT (SPF)

@

v=spf1 include:_spf.google.com ~all

Constant (one SPF record only)

TXT (DKIM)

google._domainkey

{DKIM_VALUE} generated in the Admin console

Per-domain

TXT (DMARC)

_dmarc

v=DMARC1; p=none; rua=mailto:{REPORT_ADDRESS}

Constant by policy


Google's current setup guidance uses a single MX record, smtp.google.com; many existing domains still use the older five-record set of aspmx hosts, which also works. Pick one approach and use it consistently in your template.

Generate the DKIM key per domain in the Admin console (Apps → Google Workspace → Gmail → Authenticate email), publish it, then select Start authentication.

Litemail's pre-warmed Google Workspace & Microsoft 365 inboxes come with US/EU IPs, automated DNS, full admin access, and 4–12 weeks of warm-up history — all from $4.99/inbox. No separate warm-up tool needed.

Microsoft 365 DNS Template


Type

Host / Name

Value

Constant or per-domain

TXT (verification)

@

MS=ms{NUMBER} from the admin center

Per-domain

MX

@

{DOMAIN-WITH-DASHES}.mail.protection.outlook.com (priority 0) — copy the exact value from the admin center

Per-domain

TXT (SPF)

@

v=spf1 include:spf.protection.outlook.com -all

Constant (one SPF record only)

CNAME

autodiscover

autodiscover.outlook.com

Constant

CNAME (DKIM)

selector1._domainkey

{SELECTOR1_TARGET} from Defender portal or PowerShell

Per-domain

CNAME (DKIM)

selector2._domainkey

{SELECTOR2_TARGET} from Defender portal or PowerShell

Per-domain

TXT (DMARC)

_dmarc

v=DMARC1; p=none; rua=mailto:{REPORT_ADDRESS}

Constant by policy


Microsoft changed its DKIM CNAME format for custom domains added from May 2025: targets now end in dkim.mail.microsoft, while older domains keep the earlier format ending in the tenant's onmicrosoft.com domain. Never build these by hand — copy them exactly. Microsoft's DKIM configuration guide documents both formats.

Tenants in sovereign clouds use different SPF includes; check Microsoft's SPF configuration guide if that applies to you.

Records That Must Be Unique for Every Domain

These are the values that break when templates are applied carelessly.

🔏DKIM

Google generates a key per domain; Microsoft gives per-domain CNAME targets. Copying either from another domain makes DKIM fail.

🪪Verification tokens

Each domain gets its own token from Google or Microsoft.

📮Microsoft 365 MX host

Built from the domain name; copy it from the admin center.

🧾SPF

The value can be constant, but there must be exactly one SPF record per domain — merge rather than add.

Here's the advice we'd push back on: "Export a zone file from a working domain and import it everywhere." It works for constants and breaks the per-domain records. If you use zone files, strip DKIM and verification records first and add fresh ones for each domain.

Start Sending Cold Email Today — Not in 6 Weeks
Pre-warmed Google Workspace & Microsoft 365 inboxes. Automated DNS. US & EU IPs. From $4.99/inbox.
See Domains Ready to Send →
No credit card required · Setup in 5 minutes · Cancel anytime
Start Sending Cold Email — Pre-warmed inboxes from $4
Get Inboxes

Domains That Use Both Google Workspace and Microsoft 365

Most outreach domains use one platform. Sometimes a domain needs records for both — for example, during a migration, or when a third-party tool sends from Google while mailboxes live on Microsoft 365. A few rules keep this clean.

  • Only one platform receives mail. MX records should point to one platform; mixed MX records send replies unpredictably.

  • One SPF record lists both senders — for example, v=spf1 include:spf.protection.outlook.com include:_spf.google.com -all — and stays within SPF's limit of 10 DNS lookups.

  • Each platform signs with its own DKIM. Google's TXT record at google._domainkey and Microsoft's selector CNAMEs can coexist because they use different names.

  • One DMARC record covers the domain, whichever platform sends.

For cold outreach, it's usually simpler to keep each domain on one platform and mix platforms across domains instead. That's easier to template, easier to monitor, and easier to troubleshoot. Keep your DNS templates for Google Workspace and Microsoft 365 as two separate templates, and assign each domain to exactly one of them. Mixed domains then become a rare, documented exception rather than a pattern someone copies by accident.

Get Fresh Email Inboxes — Set Up in 30 Minutes
Real Google Workspace and Microsoft 365 accounts on your domains. Automated DNS, SPF, DKIM and DMARC included.
Find Your Sending Domains →
Starts at $2.50/inbox · Automated DNS · No manual setup

Applying Templates at Scale

Once your DNS templates for Google Workspace and Microsoft 365 are written, there are several ways to apply them.


Method

Good for

Watch out for

Manual entry with a checklist

A handful of domains

Typos; slow

DNS host presets

Constant records like MX

Presets rarely include DKIM or verification

Zone file import

Many domains on one DNS host

Remove per-domain records before importing

DNS host API

Large or frequent setups

Needs per-domain values fetched first

Domain Connect

Customer-owned domains at supporting DNS providers

Not every provider supports it


For fully automated setups across many accounts, see automating domain, DNS and mailbox setup. If you'd rather not manage DNS at all, Litemail configures SPF, DKIM, and DMARC automatically for its Google Workspace and Microsoft 365 inboxes.

Verify Every Domain After Applying

Never assume your DNS templates for Google Workspace and Microsoft 365 applied correctly. Check each domain.

  1. MX: dig +short {DOMAIN} MX

  2. SPF: dig +short {DOMAIN} TXT — confirm exactly one record starting v=spf1

  3. DKIM (Google): dig +short google._domainkey.{DOMAIN} TXT

  4. DKIM (Microsoft): dig +short selector1._domainkey.{DOMAIN} CNAME

  5. DMARC: dig +short _dmarc.{DOMAIN} TXT

  6. Test message: send to a Gmail address and confirm SPF, DKIM, and DMARC all show pass in the headers.


Template mistake

Effect

Fix

Copied DKIM record

DKIM fails

Generate or copy the domain's own value

Two SPF records

SPF permerror

Merge into one record

Microsoft DKIM CNAME built by hand

Status stays CnameMissing

Copy targets exactly from the portal or PowerShell

Host field includes the domain twice

Record at the wrong name

Use only the host part, e.g. selector1._domainkey

DMARC set to reject on day one

Legitimate mail blocked if anything's misconfigured

Start at p=none and tighten later


Once records pass, add each domain to Google Postmaster Tools and your inventory. The rest of the setup is covered in cold email infrastructure setup and how to set up multiple domains.

Stop Losing Emails to Spam — Get Pre-Warmed Inboxes
Ready to send from day 1. No warm-up wait. No extra tools needed.
Find Your Sending Domains →
100,000+ mailboxes · US & EU IPs · From $4.99/inbox

DNS done for you, on every domain — Litemail Google Workspace and Microsoft 365 inboxes come with SPF, DKIM, and DMARC configured automatically on every domain, full admin access, dedicated US and EU IPs, and pre-warmed options. See Pre-Warmed Inbox Plans → About Litemail — Litemail provides pre-warmed Google Workspace and Microsoft 365 inboxes for cold email outreach, with automated DNS, dedicated US and EU IPs, and full admin access. Pre-warmed plans start at $39/month for 5 inboxes; add-on inboxes go as low as $4.99/inbox on the Scale plan. View pre-warmed inbox plans →

Related reading: DKIM Guide · SPF Records for Google Workspace and Microsoft 365 · Multi-Domain SPF for Microsoft 365 · Pre-Warmed Domains

Key Takeaways

  • DNS templates for Google Workspace and Microsoft 365 should separate constants from per-domain values.

  • Per-domain values: verification tokens, DKIM keys or CNAME targets, and Microsoft 365's MX host.

  • Publish exactly one SPF record per domain: include:_spf.google.com for Google, include:spf.protection.outlook.com for Microsoft 365.

  • Microsoft 365 DKIM uses two CNAMEs; domains added since May 2025 use targets ending in dkim.mail.microsoft.

  • Start DMARC at p=none with reporting, then tighten.

  • Verify every domain with DNS lookups and a test message before sending.

Frequently Asked Questions

What are DNS templates for Google Workspace and Microsoft 365?

Reusable lists of the MX, SPF, DKIM, DMARC, and verification records each platform needs, with placeholders for values that change per domain.

What MX record does Google Workspace use?

Google's current guidance uses smtp.google.com with priority 1. Many existing setups use Google's older five aspmx records, which also work.

What MX record does Microsoft 365 use?

A domain-specific host ending in mail.protection.outlook.com with priority 0. Copy the exact value from the Microsoft 365 admin center.

Can I copy DKIM records between domains?

No. Google generates a DKIM key per domain, and Microsoft gives per-domain CNAME targets. Copied DKIM records fail.

Why does Microsoft 365 DKIM show CnameMissing?

Usually because the CNAME records weren't published exactly as given. Copy the targets from the Defender portal or PowerShell, and enter only the host part in the name field.

Can I import a zone file to set up many domains?

Yes, for constant records. Remove DKIM and verification records first, then add each domain's own values.

Does Litemail set up DNS records automatically?

Yes. Litemail configures SPF, DKIM, and DMARC automatically for its Google Workspace and Microsoft 365 inboxes.


Skip the DNS Busywork

Litemail inboxes come with SPF, DKIM, and DMARC configured on every domain, full admin access, dedicated US and EU IPs, and free domain replacement on pre-warmed plans.

View Plans & Pricing →

Plans from $39/month · Google Workspace and Microsoft 365 · Setup in about 5 minutes

Buy Pre-Warmed Email Inboxes & Domains | Litemail — Pre-warmed Google Workspace and Microsoft 365 inboxes with automated DNS, US and EU IPs, and setup in about 5 minutes. Fresh inboxes from $2.50/inbox; pre-warmed from $4.99/inbox at scale. View plans and pricing →

Related reading: Pre-Warmed Inboxes · Google Workspace Inboxes · Microsoft 365 Inboxes · Cold Email Deliverability Guide · Litemail Home · Plans and Pricing

Book more meetings with pre-warmed mailboxesReady-to-send Google & Microsoft inboxes in 5 minutes. US/EU IPs. No warmup wait.Get pre-warmed inboxes
4.8on G2
4.5on Trustpilot
Add as a preferred source on Google

Share

Share LiteMail automated email setup on Twitter (X)
Share LiteMail email marketing growth strategies on Facebook
Share LiteMail inbox placement and outreach analytics on LinkedIn
Share LiteMail cold email infrastructure on Reddit
Share LiteMail affordable business email plans on Pinterest
Share LiteMail deliverability optimization services on Telegram
Share LiteMail cold email outreach tools on WhatsApp
Share Litemail on whatsapp
FREESearch pre-warmed domains for freeReady-to-send inboxes that land in the inbox, not spam.Search now
FREESearch pre-warmed domains for freeReady-to-send inboxes that land in the inbox, not spam.Search now
FREESearch pre-warmed domains for freeReady-to-send inboxes that land in the inbox, not spam.Search now