Every cold email you send is checked against your domain’s DNS before it reaches an inbox. Get MX, SPF, DKIM and DMARC right and mailbox providers can verify that you are who you say you are. Get them wrong and even a perfect email lands in spam.
This guide shows you how to set up DNS for a cold email sending domain yourself, for both Google Workspace and Microsoft 365, using Cloudflare or your registrar’s DNS management.
Before you start: you need a secondary domain for cold email (never your main business domain), access to that domain’s DNS, and a Google Workspace or Microsoft 365 account with the domain added. New to secondary domains? Read the cold email domain setup guide first.
The four records every sending domain needs
| Record | What it does | Where it lives |
|---|---|---|
| MX | Tells the world which server receives email for your domain | Root of the domain (@) |
| SPF | Lists which servers are allowed to send email as your domain | TXT record at @ |
| DKIM | Adds a cryptographic signature proving the email wasn’t altered | TXT or CNAME at selector._domainkey |
| DMARC | Tells receivers what to do when SPF or DKIM fail, and sends you reports | TXT record at _dmarc |
Google and Yahoo’s bulk sender rules require SPF, DKIM and DMARC for anyone sending at volume, and Microsoft applies similar rules to Outlook.com. Cold email domains should have all four.
Step 1: Choose where you manage DNS
You can manage DNS at your registrar (GoDaddy, Namecheap, Porkbun, Spaceship and others) or move it to Cloudflare, which is free, fast to update and makes it easy to manage many domains in one place.
To move DNS management to Cloudflare:
- Create a free Cloudflare account and choose Add a domain.
- Cloudflare scans your existing records. Delete anything you don’t need, such as parked-page A records.
- Cloudflare gives you two nameservers, for example
ana.ns.cloudflare.comandbob.ns.cloudflare.com. - At your registrar, open the domain’s Nameservers setting, choose Custom nameservers and paste in the two Cloudflare nameservers.
- Wait for Cloudflare to show the domain as Active. This usually takes minutes, but can take up to 24–48 hours.
Cloudflare tip: email records must be set to DNS only (grey cloud), never Proxied (orange cloud). Proxying a DKIM CNAME or a mail-related A record breaks email authentication.
Step 2: Add MX records
MX records route incoming email, including replies to your cold emails. Delete any existing MX records first, then add the records for your provider.
Google Workspace
| Type | Name | Value | Priority |
|---|---|---|---|
| MX | @ |
smtp.google.com |
1 |
Google’s current setup uses a single MX record. Older setups with five aspmx.l.google.com records still work, but you don’t need both.
Microsoft 365
| Type | Name | Value | Priority |
|---|---|---|---|
| MX | @ |
yourdomain-com.mail.protection.outlook.com |
0 |
Replace yourdomain-com with your domain, dots changed to dashes. Copy the exact value from Microsoft 365 admin center → Settings → Domains → your domain → DNS records.
Step 3: Add your SPF record
Add one TXT record at the root (@). If an SPF record already exists, edit it instead of adding a second one.
| Provider | Type | Name | Value |
|---|---|---|---|
| Google Workspace | TXT | @ |
v=spf1 include:_spf.google.com ~all |
| Microsoft 365 | TXT | @ |
v=spf1 include:spf.protection.outlook.com ~all |
Rules to follow:
- One SPF record per domain. Two records means SPF fails.
- Stay under 10 DNS lookups. Each
include:counts. A sending domain used only for Google or Microsoft needs just one include. - Use
~allor-all, never+all.
Step 4: Set up DKIM
DKIM is generated inside your email provider, then published in DNS.
Google Workspace DKIM
- Open the Google Admin console and go to Apps → Google Workspace → Gmail → Authenticate email.
- Select your domain and click Generate new record. Choose a 2048-bit key and keep the prefix selector as
google. - Add the record Google shows you:
| Type | Name | Value |
|---|---|---|
| TXT | google._domainkey |
v=DKIM1; k=rsa; p=MIIBIjANBgkq... (copy the full value) |
- Wait 10–60 minutes, then go back to the Admin console and click Start authentication. DKIM isn’t active until you do this.
If your DNS host rejects the long value, generate a 1024-bit key instead, or check whether it needs the value split into quoted strings.
Microsoft 365 DKIM
- Open the Microsoft Defender portal (security.microsoft.com) and go to Email & collaboration → Policies & rules → Threat policies → Email authentication settings → DKIM.
- Select your domain. Microsoft shows two CNAME records to publish.
- Add both as CNAME records, set to DNS only in Cloudflare:
| Type | Name | Value |
|---|---|---|
| CNAME | selector1._domainkey |
Copy the value shown for selector 1 |
| CNAME | selector2._domainkey |
Copy the value shown for selector 2 |
- Back in Defender, switch Sign messages for this domain with DKIM signatures to Enabled. If it says the records can’t be found, wait an hour and try again.
Step 5: Add a DMARC record
DMARC ties SPF and DKIM together and sends you reports about who is sending as your domain. Add a TXT record at _dmarc:
| Type | Name | Value |
|---|---|---|
| TXT | _dmarc |
v=DMARC1; p=none; rua=mailto:dmarc@yourmaindomain.com; adkim=r; aspf=r |
- Start with
p=none(monitor only) on a new domain. - After two to four weeks of clean reports, move to
p=quarantine. - Send
ruareports to a mailbox you actually read, or to a free DMARC report service.
Step 6: Optional records for cold email
Custom tracking domain
If you track opens or clicks, don’t use your sequencer’s shared tracking domain. Add a CNAME on each sending domain, for example track.yourdomain.com, pointing to the tracking host your sequencer shows in its custom tracking domain settings. Many cold emailers turn open tracking off entirely, which removes the need for this record.
Forward the domain to your main website
Prospects who visit your sending domain should land on your real website. In Cloudflare, add a Redirect Rule (301) from yourdomain.com/* to https://yourmainsite.com. Most registrars also offer a simple domain forwarding option.
Step 7: Verify everything before warmup
- Run your domain through the free DNS checker and confirm MX, SPF, DKIM and DMARC all pass.
- Run the blacklist checker to make sure the domain isn’t already listed, which matters most for domains with a previous owner.
- Send a test email to a Gmail and an Outlook address and check Show original (Gmail) for
SPF: PASS,DKIM: PASSandDMARC: PASS.
Once everything passes, connect the inboxes to your sequencer and start the 14-day warmup.
Common DNS mistakes that break deliverability
- Two SPF records on the same domain, often left over from a website builder.
- Proxied (orange cloud) records in Cloudflare for DKIM CNAMEs.
- Forgetting to click “Start authentication” in Google Admin, so DKIM is published but never used.
- Using
p=rejecton day one, which blocks your own email if anything is misconfigured. - Old MX records left in place, so replies go to the wrong server.
- Typos in the host name, such as
_dmarc.yourdomain.com.yourdomain.comwhen the DNS host adds the domain automatically.
