GTMRun

SPF: authorize your senders

Last updated: 2026-11-16

Google requirement

What it is #

SPF (Sender Policy Framework) is a TXT record on your domain that lists which mail servers are allowed to send email as you@yourdomain.com. Receiving servers check it and treat mail from unlisted servers as suspicious.

Why it matters #

Gmail requires SPF or DKIM on every message, and bulk senders (5,000+ messages a day to Gmail) need SPF, DKIM and DMARC. Google also recommends authenticating the domain your public website runs on, even if you only send from a subdomain. Without SPF, your cold emails and even your password-reset emails are more likely to land in spam or be rejected.

How we check it #

We look up the TXT records on your root domain over DNS-over-HTTPS and pass this check if one of them starts with v=spf1. If you scan a subdomain such as docs.yourdomain.com, we check the domain it belongs to, because that's where your email is sent from. If the DNS lookup itself fails, the check shows not measured, not failed.

We don't yet evaluate what's inside the record (for example, a +all or a missing include). That's on you — see the tips below.

How to fix #

  1. List every service that sends email as your domain. Mailbox provider (Google Workspace, Microsoft 365), plus anything that sends as @yourdomain.com: help desk, CRM, newsletter tool, transactional email.
  2. Build one record. Start from your mailbox provider and add each service's include: Add others inside the same record, before ~all, for example
    v=spf1 include:_spf.google.com ~all

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

  1. Publish it as a TXT record on the root (@ or yourdomain.com).
Route 53
Name: yourdomain.com   Type: TXT   TTL: 300
Value: "v=spf1 include:_spf.google.com ~all"

⚠ Route 53 keeps ONE TXT record set per name. If you already have a TXT
record at the root (e.g. google-site-verification), EDIT that record set
and add SPF as another value — don't create a second set or overwrite it.
Cloudflare
DNS → Add record → Type: TXT → Name: @
Content: v=spf1 include:_spf.google.com ~all
(Cloudflare adds the quotes for you. Proxy status doesn't apply to TXT.)
GoDaddy / Namecheap
DNS → Add → TXT → Host: @
Value: v=spf1 include:_spf.google.com ~all
TTL: 1 hour (or the default)

Verify it yourself #

dig +short TXT yourdomain.com | grep spf1

Or use Google's free Check MX tool.

Runs GTMRun's own checks only — seconds, no third-party calls.

Tips #

  • One SPF record per domain. Two v=spf1 records is an error, and receivers may ignore both. Merge them into one.
  • Keep it under 10 DNS lookups. Every include:, a, mx and redirect counts toward a hard limit of 10. Too many includes breaks SPF for all your mail.
  • ~all (soft fail) is the safe start. Move to -all only when you're sure every legitimate sender is listed.
  • Sending from a subdomain? A service that sends from mail.yourdomain.com needs SPF on that name. We use Resend on mail.gtmrun.co (SPF on send.mail.gtmrun.co) and Google Workspace on the root, so they're separate records.
  • What we learned fixing gtmrun.co: our root had two google-site-verification TXT values and no SPF. A plain "upsert SPF" would have replaced the set and silently deleted both verification tokens. We merged instead.

Sources #