MTA-STS Setup Guide for Google Workspace (MX Patterns & Enforce Rollout)
Exact RFC 8461 mta-sts.txt MX patterns for Google Workspace (both modern smtp.google.com and legacy 5-record aspmx.l.google.com setups), plus TLS-RPT validation and enforce rollout.
Zero Telemetry · Strict CSP (connect-src 'none')
Domain Trust & Email-TLS Configuration
RFC 8461 · 8460 · 8659 · 9116
Input sanitization applied: stripped disallowed newlines, control characters, semicolons, or invalid hostname characters.
Type Name Flags Tag Value TTL
CAA @ 0 issue letsencrypt.org Auto
CAA @ 0 issue pki.goog Auto
CAA @ 0 issuewild letsencrypt.org Auto
CAA @ 0 issuewild pki.goog Auto
CAA @ 0 iodef mailto:[email protected] Auto
CAA-ISSUE-OK: 2 authorized CA(s) pinned via RFC 8659PASS
Only letsencrypt.org, pki.goog may issue TLS certificates for example.com.
CAA-WILD-OK: Explicit issuewild records match authorized CAsPASS
Wildcard issuance (*.domain) is explicitly scoped to your selected CAs.
Verify Live DNS Records or Deploy All 9 ReadyCheck Fixes Together
In our N=140 B2B SaaS Readiness Benchmark, 95.2% (60/63) missed _mta-sts and 79.4% lacked valid RFC 9116 security.txt. Scan your live domain on ReadyCheck (https://audit.runglab.dev), order the tailored $49 9-File Domain Fix Pack, or automate via remote MCP Server dev.runglab/devtools.
Verify Google Workspace MX Coverage Before Enforcing
check-google-mx.sh
# Verify every MX record returned for your domain matches at least one mx: line above:
dig +short MX example.com
# Expected modern: 1 smtp.google.com.
# Expected legacy: 1 aspmx.l.google.com., 5 alt1.aspmx.l.google.com., 10 alt3.aspmx.l.google.com.
# Also verify Google's TLS certificate SAN on port 25:
openssl s_client -starttls smtp -connect smtp.google.com:25 -verify_hostname smtp.google.com </dev/null
Step-by-Step Deployment & Key Insights
Run dig +short MX <your-domain> to confirm whether your Google Workspace tenant uses smtp.google.com or legacy aspmx.l.google.com hosts.
Generate mta-sts.txt in testing mode listing all active Google MX hostnames and *.aspmx.l.google.com.
Host the policy file at https://mta-sts.<your-domain>/.well-known/mta-sts.txt and publish _mta-sts + _smtp._tls DNS TXT records.
Review TLS-RPT reports for 7 days to confirm 0 certificate or MX mismatch errors, then switch mode: enforce.
Many Google Workspace domains break MTA-STS when upgrading from legacy 5-MX records to smtp.google.com (or vice-versa) if mta-sts.txt omits one set.
RFC 8461 wildcards match only ONE leftmost DNS label: *.aspmx.l.google.com matches alt1.aspmx.l.google.com, whereas *.google.com would NOT match alt1.aspmx.l.google.com.
Google's inbound mail servers present valid TLS 1.2/1.3 certificates matching each MX hostname, making enforce mode safe once MX patterns match.
Omitting *.googlemail.com while legacy aspmx2.googlemail.com / aspmx3.googlemail.com MX records remain in DNS.
Setting max_age: 31536000 during initial testing — if a typo exists in testing or enforce, remote MTAs cache it for up to a year unless id= is rotated.
Deploy RFC 8461 MTA-STS on Cloudflare in under 5 minutes without a separate origin server: host https://mta-sts.<domain>/.well-known/mta-sts.txt via Cloudflare Pages or a 12-line Worker plus _mta-sts TXT.
Configure RFC 8461 MTA-STS and RFC 8460 TLS-RPT for Microsoft 365 Exchange Online tenants using *.mail.protection.outlook.com, custom *.mx.microsoft endpoints, and safe testing-to-enforce rollout.
Publish RFC 8460 _smtp._tls.<domain> TXT records to receive daily compressed JSON reports from Gmail, Microsoft, and Yahoo detailing every successful STARTTLS/DANE/MTA-STS session and failure.
Build a compliant default._bimi.<domain> DNS TXT record and SVG Tiny 1.2 Portable/Secure (tiny-ps) logo, while avoiding the DMARC p=none and pct<100 traps that block Gmail and Apple Mail.
Compare Verified Mark Certificates (VMC) and Common Mark Certificates (CMC) for BIMI: trademark registration rules, DigiCert/Entrust issuance, Gmail blue checkmark vs logo-only display, and Apple Mail requirements.
Restrict which Certificate Authorities can issue TLS certificates for your domain with RFC 8659 CAA records: exact issue, issuewild, and iodef syntax for BIND and Cloudflare DNS.
Should I include both smtp.google.com and aspmx.l.google.com in mta-sts.txt?
Yes — unless you are certain your DNS MX only uses one set, including both legacy and modern Google MX patterns prevents outages during Workspace MX migrations.
Does Google Workspace require MTA-STS for Gmail delivery?
MTA-STS protects INBOUND email sent to your Google Workspace domain from STARTTLS downgrade attacks, and signals enterprise security maturity on ReadyCheck and vendor audits.
How do I validate Google Workspace SPF lookups alongside MTA-STS?
Use Cluster 1A (/spf-dmarc/) to keep include:_spf.google.com (3 lookups) safely under the 10-DNS-lookup limit.