MTA-STS for Google Workspace (Gmail): The aspmx.l.google.com MX Enumeration, External HTTPS Hosting for mta-sts.<domain>, the _mta-sts id-Token Coupling, TLS-RPT Pairing for Monitoring, the Testing-to-Enforce Burn-in Workflow, and Why There Is No Admin Console MTA-STS Panel

A focused operator-implementation walkthrough for MTA-STS on Google Workspace / Gmail-for-business tenants. The Workspace MTA-STS deployment model is structurally different from Workspace DKIM and SPF: configuration lives entirely outside the Google administrative surface (no Admin Console panel, no gcloud command, no Postmaster Tools pane), Workspace provides the inbound MX targets (aspmx.l.google.com plus alt1-4.aspmx.l.google.com on the legacy MX configuration, or smtp.google.com on the simplified configuration) but does NOT host the policy file (operators must stand up external HTTPS hosting at the mta-sts.<domain> subdomain via Firebase Hosting, Cloud Run, Google Cloud Storage + Cloud CDN, Cloudflare Pages, GitHub Pages, or any commodity HTTPS host), and Gmail acts as both a recipient (with Workspace inbound MX) and a sender (honoring recipient MTA-STS policies on outbound TLS sessions from 2018 onward — Google was an early sender-side implementer). Documents the four-step deployment workflow (publish _mta-sts TXT record, stand up external HTTPS hosting, serve the policy file at /.well-known/mta-sts.txt, publish TLS-RPT companion record), MX enumeration for legacy / simplified / third-party-gateway tenant shapes, the testing-mode burn-in discipline, ten common mistakes, and a per-symptom troubleshooting decision matrix. Differentiation from sibling guides: help_mta_sts_explained.php is the protocol primer; help_mta_sts_policy_syntax.php is the byte-level policy-file reference; help_mta_sts_vs_dane.php is the comparison view; help_mta_sts_for_microsoft_365.php is the M365 counterpart; this page is the Workspace-specific operator reference.

This reference is provided in English. RFC 8461 canonical syntax (v=STSv1, _mta-sts, mode: enforce, mx:) and Google Workspace hostnames (aspmx.l.google.com, smtp.google.com, admin.google.com, gappssmtp.com, postmaster.google.com), tooling labels (Admin Console, Postmaster Tools, Apps > Google Workspace > Gmail > Authenticate email), and Google Cloud platform service names (Cloud Run, Firebase Hosting, Cloud Storage, Cloud CDN, Cloud Load Balancing, Google Trust Services) do not translate. We keep the body in the source language so technical terms remain consistent with the specifications and Google Workspace Help documentation.

TL;DR

  • Google Workspace MTA-STS is operator-driven at the DNS and external HTTPS layers — there is no Admin Console panel, no gcloud cmdlet, no Postmaster Tools pane. Configuration lives entirely outside the Google administrative surface.
  • Four-step deployment: (1) publish the _mta-sts.<your-domain> TXT record with v=STSv1; id=<token>; (2) stand up an HTTPS endpoint at mta-sts.<your-domain> (Workspace does NOT host this); (3) serve the policy file at /.well-known/mta-sts.txt with mode: testing initially; (4) publish the TLS-RPT companion record at _smtp._tls.<your-domain> for monitoring.
  • The mx: directive enumerates the exact MX hostnames that deliver inbound mail to your tenant. For a standard Workspace tenant on the legacy five-target MX config this is aspmx.l.google.com plus alt1.aspmx.l.google.com through alt4.aspmx.l.google.com (five lines in the policy file). For tenants migrated to the simplified MX configuration this is a single smtp.google.com entry.
  • External HTTPS hosting is mandatory for the policy file. Workspace-aligned hosts: Google Cloud Storage + Cloud CDN (with Cloud Load Balancing for HTTPS), Cloud Run (free tier, autoprovisions HTTPS), Firebase Hosting (free tier, instant custom-domain HTTPS via Let's Encrypt), Cloudflare Pages, AWS S3+CloudFront, GitHub Pages with custom domain, Netlify, Vercel, or any commodity LAMP/NGINX host. The certificate at mta-sts.<your-domain> must validate against the public PKI.
  • Testing-mode burn-in: publish with mode: testing + max_age: 86400 (24h) for 1-2 weeks while TLS-RPT reports populate. Once sts-policy-fetch-error, sts-policy-invalid, sts-webpki-invalid, and certificate-host-mismatch are all absent for 7+ consecutive days, promote to mode: enforce and increase max_age to 604800 (one week — Google caps the honored cache lifetime at 604800 regardless of higher values you publish).
  • Gmail is BOTH a recipient (with Workspace inbound MX) AND a sender (honoring MTA-STS on outbound TLS sessions since 2018). As a recipient, Workspace provides the MX endpoint you enumerate in the mx: directive. As a sender, Gmail fetches recipient MTA-STS policies and refuses to deliver over plaintext when mode: enforce is in effect.
  • The id-token bump rule: every edit to the policy file MUST coincide with a fresh id= value in the _mta-sts TXT record. Senders use the id-token to detect when their cached policy is stale and should be re-fetched.
  • MTA-STS does not replace DMARC; the two protocols protect different layers (MTA-STS protects transport encryption, DMARC protects sender authentication). Pair with DMARC for Google Workspace for end-to-end anti-spoofing protection.

What this guide covers

A focused operator-implementation walkthrough for MTA-STS (SMTP MTA Strict Transport Security, RFC 8461) on Google Workspace / Gmail-for-business tenants. Sibling pages cover the protocol primer (MTA-STS explained), the byte-level policy-file reference (MTA-STS policy file syntax), the MTA-STS-vs-DANE decision view (MTA-STS vs DANE for SMTP), and the M365 counterpart (MTA-STS for Microsoft 365). THIS page is the Workspace-specific operator reference: the aspmx.l.google.com / alt1-4 MX-enumeration in the mx: directive, the mandatory external HTTPS hosting for the mta-sts.<your-domain> subdomain (Workspace does NOT serve the policy file natively), the absence of any Admin Console MTA-STS configuration UI, the TLS-RPT pairing for monitoring, and Gmail's role as an MTA-STS-honoring sender since 2018.

The page is anchored against current Google Workspace deployment realities: Workspace tenants receive mail via the five aspmx.l.google.com / alt1-4.aspmx.l.google.com MX targets (or the simplified smtp.google.com single-target config for newer tenants), Gmail honors recipient MTA-STS policies when sending outbound mail (from 2018 onward — Google was one of the earliest sender-side implementers), and the Admin Console has no MTA-STS configuration panel. Hardening inbound SMTP transport against downgrade attacks via MTA-STS is therefore entirely an operator responsibility executed at the DNS and external HTTPS layers.

How Google Workspace MTA-STS deployment works

Workspace MTA-STS deployment is structurally different from Workspace DKIM and SPF deployment in three ways:

1. Configuration lives entirely outside the Workspace admin surface

Unlike DKIM (configured in the Admin Console at Apps > Google Workspace > Gmail > Authenticate email) and SPF (verified via DMARC alignment monitoring in Postmaster Tools), MTA-STS has NO Google administrative interface. There is no gcloud workspace mta-sts command, no Admin Console toggle, no Postmaster Tools panel. Configuration is purely DNS (the _mta-sts TXT record at your authoritative nameserver) plus external HTTPS (the policy file served at a non-Google web host, or a Google Cloud host outside the Workspace tenant boundary).

2. Workspace provides the MX endpoint, not the policy host

Google Workspace supplies the inbound MX targets that operators enumerate in the policy file mx: directive. For a standard tenant on the legacy MX configuration, these are five targets: aspmx.l.google.com (priority 1), alt1.aspmx.l.google.com and alt2.aspmx.l.google.com (priority 5), and alt3.aspmx.l.google.com and alt4.aspmx.l.google.com (priority 10). Tenants migrated to the simplified MX configuration see a single smtp.google.com target (priority 1). Google does NOT host the policy file itself — Gmail is a mail platform, not a web platform. Operators must spin up a separate HTTPS host for the mta-sts.<your-domain> subdomain.

3. Gmail is also an MTA-STS-honoring sender

Gmail's outbound mail platform has honored recipient MTA-STS policies since 2018. When delivering mail to a recipient domain that has published an MTA-STS policy in mode: enforce, Gmail fetches the policy, caches it for up to 604800 seconds (one week — Google's published cap, regardless of higher max_age values the policy advertises), and refuses to deliver over plaintext or with an unauthenticated certificate. Operators do not need to enable this behaviour — it ships on by default in current Workspace tenants. The dual role (Workspace as both recipient and sender) means every Workspace tenant deploys MTA-STS for two independent reasons: to protect inbound mail arriving at the tenant's MX, and to ensure outbound mail to MTA-STS-emitting recipients delivers correctly.

Prerequisites

  • An active Google Workspace tenant with at least one custom accepted domain (the domain you want to protect with MTA-STS). Verify with the Admin Console at admin.google.com > Domains > Manage domains.
  • DNS administration rights at your custom domain's authoritative nameservers (to publish the _mta-sts TXT record, the _smtp._tls TLS-RPT TXT record, and a CNAME or A/AAAA record at the mta-sts subdomain that points at your chosen HTTPS host).
  • Access to an external HTTPS hosting platform (Google Cloud Storage + Cloud CDN, Cloud Run, Firebase Hosting, Cloudflare Pages, AWS S3 + CloudFront, GitHub Pages, Netlify, Vercel, or any commodity LAMP/NGINX host). The platform must support custom-hostname HTTPS with a publicly-trusted certificate for the mta-sts.<your-domain> hostname.
  • A mailbox or webhook endpoint to receive TLS-RPT reports (typically tls-reports@<your-domain> on the Workspace tenant itself, or a third-party TLS-RPT analytics provider like Hardenize, Postmark, or Valimail).
  • DMARC and SPF already published for the custom domain — see DMARC for Google Workspace and SPF for Google Workspace. MTA-STS protects the transport layer; DMARC and SPF protect the authentication layer. All three together form the canonical Workspace anti-spoofing posture.

Step 1: Publish the _mta-sts DNS TXT record

The _mta-sts TXT record signals to senders that your domain publishes an MTA-STS policy and supplies the id-token they use to detect when their cached policy is stale. Publish a single TXT record at the _mta-sts label of your custom domain:

; Replace example.com with your custom domain and 20260522T120000
; with a fresh unique token (typically a timestamp; any string of 1-32
; alphanumeric characters is valid per RFC 8461 §3.1):

_mta-sts.example.com.  IN  TXT  "v=STSv1; id=20260522T120000"

Two tags only: v=STSv1 (case-sensitive uppercase, MUST appear first) and id=<token> (1-32 alphanumeric characters, opaque to senders, used as a cache-bust signal). The record MUST live at the three-label name _mta-sts.<your-domain> (with a leading underscore on _mta-sts). Publishing at mta-sts.<your-domain> (without the underscore) is the #1 silent- record-ignoring drift class.

Verify publication with dig:

$ dig +short TXT _mta-sts.example.com
"v=STSv1; id=20260522T120000"

The id-token discipline matters operationally: every time you edit the policy file at https://mta-sts.<your-domain>/.well-known/mta-sts.txt, you MUST bump the id= value in this TXT record. Senders cache the policy by id-token; without the bump, they continue serving stale policy from cache for up to the max_age of the previous fetch (Gmail caps that at 604800 seconds — one week).

Step 2: Stand up HTTPS hosting for mta-sts.<your-domain>

Google Workspace does NOT host the MTA-STS policy file. Operators must provision an external HTTPS endpoint at the mta-sts subdomain of their custom domain. The endpoint requirements per RFC 8461 §3.3:

  • HTTPS-only. Plaintext HTTP on port 80 is not honored; senders fetch via HTTPS on port 443 only.
  • Publicly-trusted TLS certificate. The certificate must validate against the public PKI (Let's Encrypt, DigiCert, GlobalSign, Sectigo, Google Trust Services, etc.) and its Subject CN or SAN must include mta-sts.<your-domain>. Self-signed certificates, private-CA certificates, and wildcard certificates that don't cover the mta-sts subdomain all cause sts-webpki-invalid in TLS-RPT and silent policy rejection.
  • Content-Type text/plain on the policy file response. Other Content-Type values (notably application/octet-stream and text/html) cause sts-policy-invalid.
  • HTTP/1.1 or HTTP/2. Both are honored; HTTP/3 is not yet universally supported on the sender side and should not be relied on as the sole transport.

Hosting options for a Workspace tenant

The most common operator choices, in approximate order of Workspace-affinity:

  1. Firebase Hosting (free tier, instant custom-domain HTTPS via Let's Encrypt — managed by Firebase automatically). The lowest-friction Workspace-aligned option: deploy a single static file with firebase deploy and the endpoint comes up in minutes.
  2. Cloud Run (free tier, autoprovisions HTTPS via Google Trust Services). Suitable for tenants already using Cloud Run for other workloads; deploy a minimal container serving the static policy file.
  3. Google Cloud Storage + Cloud CDN (Workspace-tier hosting, requires Cloud Load Balancing for custom-hostname HTTPS). Common for tenants with existing GCP infrastructure; certificate provisioning via Google-managed certificates on the load balancer.
  4. Cloudflare Pages or Cloudflare Workers (free tier, supports custom-hostname HTTPS via Cloudflare's certificate authority — typical for tenants already proxying their primary domain through Cloudflare).
  5. GitHub Pages with custom domain (auto-HTTPS via Let's Encrypt, free for public repositories). The simplest zero-cost option for small tenants.
  6. AWS S3 + CloudFront (low cost, certificate via ACM). Common for organizations with existing AWS infrastructure.
  7. Netlify or Vercel (free tier, zero-config HTTPS).
  8. Any commodity LAMP/NGINX host you already operate (works fine, requires manual certificate provisioning via Let's Encrypt or your existing CA).

DNS for the mta-sts subdomain

Whichever host you choose, publish a CNAME (or A/AAAA records, depending on the host's DNS pointer requirements) at mta-sts.<your-domain> pointing at the host:

; Example: Firebase Hosting (firebaseapp.com / web.app target)
mta-sts.example.com.  IN  CNAME  example-mta-sts.web.app.

; Example: Cloud Run service
mta-sts.example.com.  IN  CNAME  ghs.googlehosted.com.

; Example: Cloudflare Pages fronted at mypages.pages.dev
mta-sts.example.com.  IN  CNAME  mypages.pages.dev.

; Example: GitHub Pages custom domain — A records to GitHub's IPs
mta-sts.example.com.  IN  A      185.199.108.153
mta-sts.example.com.  IN  A      185.199.109.153
mta-sts.example.com.  IN  A      185.199.110.153
mta-sts.example.com.  IN  A      185.199.111.153

Verify the HTTPS endpoint is reachable and serves a valid certificate:

$ curl -v https://mta-sts.example.com/.well-known/mta-sts.txt
*   Trying 185.199.108.153:443...
* Connected to mta-sts.example.com
* SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
* Server certificate:
*  subject: CN=mta-sts.example.com
*  start date: Mar  1 00:00:00 2026 GMT
*  expire date: May 30 23:59:59 2026 GMT
*  issuer: CN=Let's Encrypt R3, O=Let's Encrypt, C=US
*  SSL certificate verify ok.
> GET /.well-known/mta-sts.txt HTTP/2
< HTTP/2 200
< content-type: text/plain
< content-length: 148
version: STSv1
mode: testing
mx: aspmx.l.google.com
mx: alt1.aspmx.l.google.com
mx: alt2.aspmx.l.google.com
mx: alt3.aspmx.l.google.com
mx: alt4.aspmx.l.google.com
max_age: 86400

Step 3: Publish the policy file at /.well-known/mta-sts.txt

Serve the policy file at the path /.well-known/mta-sts.txt on the mta-sts.<your-domain> HTTPS host. The file is plain text with one key: value pair per line per RFC 8461 §3.2. The four canonical keys:

version: STSv1
mode: testing
mx: aspmx.l.google.com
mx: alt1.aspmx.l.google.com
mx: alt2.aspmx.l.google.com
mx: alt3.aspmx.l.google.com
mx: alt4.aspmx.l.google.com
max_age: 86400

Field-by-field:

version: STSv1
Case-sensitive uppercase STSv1. MUST appear first. Senders reject the policy when version is missing, mis-cased (stsv1, STSV1), or unrecognised.
mode:
One of enforce, testing, or none. Case-sensitive lowercase. testing: senders report failures via TLS-RPT but still deliver mail. enforce: senders refuse to deliver over plaintext or with an unauthenticated certificate. none: emergency-rollback signal — equivalent to having no policy. Standard rollout: publish with testing for 1-2 weeks, review TLS-RPT, promote to enforce.
mx:
One per line per MX host that handles inbound mail. For a Workspace tenant on the legacy MX configuration, this is five lines: aspmx.l.google.com plus alt1.aspmx.l.google.com through alt4.aspmx.l.google.com. For the simplified MX configuration, this is a single smtp.google.com line — see the next section. Single-label wildcards (*.l.google.com) match exactly one label and are valid per RFC 8461 §3.2; multi-label wildcards are not supported.
max_age:
Cache lifetime in seconds. 86400 (24h) is typical for initial testing-mode publication; 604800 (7 days) for stable enforce-mode policies. Google caps the cache lifetime it honors at 604800 regardless of higher values published, so anything beyond one week is effectively no-op for Gmail-as-sender. RFC 8461 §3.2 caps max_age at 31557600 (one Julian year); senders MUST honor values up to that cap but MAY cap shorter (Google caps at 604800).

Worked example for a standard Workspace tenant at example.com in initial testing-mode burn-in (legacy five-target MX config):

version: STSv1
mode: testing
mx: aspmx.l.google.com
mx: alt1.aspmx.l.google.com
mx: alt2.aspmx.l.google.com
mx: alt3.aspmx.l.google.com
mx: alt4.aspmx.l.google.com
max_age: 86400

Worked example for a Workspace tenant on the simplified MX configuration:

version: STSv1
mode: testing
mx: smtp.google.com
max_age: 86400

After 7-14 days with no TLS-RPT failures, promote to enforce mode with a longer max_age:

version: STSv1
mode: enforce
mx: aspmx.l.google.com
mx: alt1.aspmx.l.google.com
mx: alt2.aspmx.l.google.com
mx: alt3.aspmx.l.google.com
mx: alt4.aspmx.l.google.com
max_age: 604800

Don't forget to bump the id= value in the _mta-sts TXT record every time the policy file changes. Without the bump, senders continue serving the cached policy until their cached max_age expires.

Enumerating MX hosts in the mx: directive

The mx: directive is an enumeration — only listed hostnames can deliver mail under MTA-STS enforcement. Mis-listing an MX is the #1 reason legitimate inbound mail bounces after promoting to mode: enforce.

Standard Workspace tenant (legacy five-target MX)

Run dig +short MX <your-domain> to discover your tenant's MX targets:

$ dig +short MX example.com
1 aspmx.l.google.com.
5 alt1.aspmx.l.google.com.
5 alt2.aspmx.l.google.com.
10 alt3.aspmx.l.google.com.
10 alt4.aspmx.l.google.com.

The legacy MX configuration uses five targets at three priority levels (1 / 5 / 10). Enumerate all five in the policy file mx: directive:

mx: aspmx.l.google.com
mx: alt1.aspmx.l.google.com
mx: alt2.aspmx.l.google.com
mx: alt3.aspmx.l.google.com
mx: alt4.aspmx.l.google.com

Single-label wildcards are also accepted by RFC 8461 §3.2 — a single *.l.google.com entry matches all five canonical MX targets and is a valid (though less explicit) alternative:

mx: *.l.google.com

Operators choosing the wildcard form should document that choice prominently — explicit enumeration of the five canonical hostnames is easier to audit when reviewing the policy against future MX configuration changes.

Workspace tenant on the simplified MX configuration

Newer Workspace tenants migrated to the simplified MX configuration see a single target:

$ dig +short MX example.com
1 smtp.google.com.
mx: smtp.google.com

The simplified configuration is functionally equivalent — Google's infrastructure routes the single smtp.google.com hostname to the same backend inbound infrastructure as the legacy five-target shape. The MTA-STS policy must match whatever shape the DNS MX records actually publish; if your tenant migrates from legacy to simplified, update the policy file BEFORE swapping MX records or cached policies will reject the new MX target.

Third-party security gateway in front of Workspace

Tenants behind Mimecast, Proofpoint, Barracuda, FortiMail, or other security gateways have MX pointing at the gateway's public hostnames rather than directly at Workspace:

$ dig +short MX example.com
10 us-smtp-inbound-1.mimecast.com.
10 us-smtp-inbound-2.mimecast.com.
mx: us-smtp-inbound-1.mimecast.com
mx: us-smtp-inbound-2.mimecast.com

The gateway forwards mail to the Workspace endpoint internally — that hop is not visible to external MTA-STS-honoring senders, so the aspmx.l.google.com hostnames should NOT appear in mx: when a gateway is in front. Confirm the gateway itself supports STARTTLS and a valid publicly-trusted certificate before promoting to enforce mode.

Multi-domain tenant

Each accepted domain in a multi-domain Workspace tenant needs its own MTA-STS policy with its own mx: list. The policies do NOT inherit across the tenant. A policy published at mta-sts.example.com does NOT protect mail delivered to example.co.uk in the same tenant — operators must publish separate _mta-sts.example.co.uk and mta-sts.example.co.uk/.well-known/mta-sts.txt pairs for each domain.

Step 4: TLS-RPT for monitoring

MTA-STS is operationally blind without TLS-RPT (SMTP TLS Reporting, RFC 8460). Senders report TLS handshake failures and policy-fetch failures back to you via the rua= mailbox declared in _smtp._tls.<your-domain>. Publish the companion record:

_smtp._tls.example.com.  IN  TXT  "v=TLSRPTv1; rua=mailto:tls-reports@example.com"

Senders honor TLS-RPT by submitting JSON reports per RFC 8460 §4 once per day summarising every TLS handshake outcome against your domain. The report enumerates summary.total-successful-session-count, summary.total-failure-session-count, and per-failure failure-details[] entries with result-type values from the 12-value catalogue (the MTA-STS-specific values to watch: sts-policy-fetch-error, sts-policy-invalid, sts-webpki-invalid, certificate-host-mismatch, certificate-expired, starttls-not-supported).

Without TLS-RPT, the testing-mode burn-in workflow is impossible — operators have no visibility into whether senders successfully fetched the policy and validated the certificate. Always publish TLS-RPT BEFORE promoting MTA-STS to enforce mode. See TLS-RPT explained, TLS-RPT DNS record syntax, and TLS-RPT JSON report format for the byte-level references.

Receiving TLS-RPT reports on Google Workspace

The simplest setup uses a dedicated mailbox on the Workspace tenant itself (tls-reports@<your-domain>). The mailbox receives JSON attachments with filename <reporter>!<policy-domain>!<unix-start>!<unix-end>.json[.gz] per RFC 8460 §5.1. Configure the mailbox to auto-forward to a TLS-RPT analytics provider (Hardenize, Postmark, Valimail, Skysnag) or build an in-house ingestion pipeline via the DMARC Analyzer API that parses the JSON attachments into the dmarc_tls_reports table. Postmaster Tools (postmaster.google.com) surfaces aggregate DMARC posture but does NOT ingest or display TLS-RPT reports — the reports flow directly to the rua= mailbox or webhook the operator publishes.

Testing-mode burn-in workflow

The canonical testing-to-enforce migration discipline for a Workspace tenant:

  1. Week 0. Publish the _mta-sts TXT record, stand up HTTPS hosting (Firebase Hosting or Cloud Run is the lowest-friction path for Workspace tenants), publish the policy file with mode: testing and max_age: 86400. Publish TLS-RPT pointing at tls-reports@<your-domain>.
  2. Day 1-3. Confirm policy is reachable via curl and the certificate validates. Confirm DNS records resolve via dig.
  3. Day 7. Begin reading TLS-RPT reports arriving from Google Workspace (other tenants), Microsoft 365, Yahoo, ProtonMail, and other MTA-STS-honoring senders. Watch for sts-policy-fetch-error, sts-policy-invalid, sts-webpki-invalid, and certificate-host-mismatch in the failure-details[] array.
  4. Week 2. If TLS-RPT reports show all four MTA-STS-specific failure types absent for 7+ consecutive days AND the total-successful-session-count is substantially greater than zero (so you know senders are actually attempting policy-validated delivery), promote to mode: enforce and increase max_age to 604800 (7 days — Google's enforced cap). Bump the id= value in the _mta-sts TXT record.
  5. Week 4+. With enforce mode stable, Workspace tenants typically leave max_age at 604800 — higher values are silently capped at 604800 by Gmail-as-sender, so anything beyond one week is no-op for the dominant sender. Bump id= on every future policy edit.
  6. Operational discipline. Every future change to MX records, the mta-sts.<your-domain> certificate, or the mta-sts.<your-domain> HTTPS host provider MUST be preceded by reverting to mode: testing for 24-72 hours while the change burns in. The cached-policy enforcement window is precisely why MTA-STS is brittle to infrastructure changes: cached enforce policies survive on the sender side until max_age expires regardless of what you change on your end.

Emergency rollback (mode: none)

If a misconfiguration causes legitimate inbound mail to bounce in enforce mode, revert to mode: none and bump the id-token. Senders fetch the new policy on their next cache-bust signal (within minutes of the TXT record TTL expiring) and suspend enforcement. mode: none is semantically equivalent to having no policy — emergency-rollback only.

Ten common Google Workspace MTA-STS mistakes

  1. Assuming Google hosts the policy file. Gmail is a mail platform, not a web platform. Google Workspace does NOT serve content at mta-sts.<your-domain>; operators must spin up an external HTTPS host (Firebase Hosting and Cloud Run are the lowest-friction Workspace-aligned options). The single most common "where do I start" confusion.
  2. Looking for an MTA-STS panel in the Admin Console. There is none. MTA-STS configuration is entirely DNS + external HTTPS, outside the Google administrative surface. No gcloud command, no Postmaster Tools pane, no Admin Console toggle.
  3. Publishing the policy file at the bare apex domain instead of the mta-sts subdomain. RFC 8461 §3.3 locks the hostname to mta-sts.<domain> — publishing the file at https://<your-domain>/.well-known/mta-sts.txt is silently ignored by senders.
  4. Forgetting the leading underscore on the TXT record. The DNS record lives at _mta-sts.<domain> (underscore prefix per RFC 8552 underscore-label convention). Publishing at mta-sts.<domain> (no underscore) confuses MTA-STS configuration with the HTTPS host configuration and produces silent record-ignoring.
  5. Listing only aspmx.l.google.com without the alt1-4 siblings. On the legacy MX configuration, Workspace inbound mail can land at any of the five MX targets (aspmx + alt1-4) depending on routing health. Listing only the priority-1 host in mx: causes mail to bounce when senders attempt delivery to alt1-4 under enforcement. Enumerate all five, or use the *.l.google.com wildcard.
  6. Promoting to enforce before the policy file is reachable. With mode: enforce in effect, a broken HTTPS endpoint causes sts-policy-fetch-error on every sender and inbound mail bounces. Always confirm the endpoint is reachable via curl and the certificate validates BEFORE promoting to enforce.
  7. Forgetting to bump the id-token after a policy edit. Senders cache the policy by id-token; without the bump, the cached policy persists until max_age expires regardless of what you change on your end. Every policy edit MUST be paired with an id= bump in the _mta-sts TXT record.
  8. Using a wildcard certificate that doesn't cover the mta-sts subdomain. A *.example.com wildcard covers mta-sts.example.com; a example.com bare-apex certificate does NOT. Operators reusing an existing apex certificate for the mta-sts hostname see sts-webpki-invalid on every TLS-RPT report.
  9. Skipping TLS-RPT. Without TLS-RPT, the testing-mode burn-in workflow is impossible — operators have no visibility into whether senders successfully fetched and validated the policy. Always publish TLS-RPT BEFORE the MTA-STS policy.
  10. Setting max_age higher than 604800 expecting Gmail to honor it. Gmail-as-sender caps the cache lifetime it honors at 604800 (one week) regardless of higher values the policy advertises. Operators who publish max_age: 2592000 (30 days) expecting longer cache pinning from Gmail see the same one-week cache in practice. Other senders may honor longer windows; Gmail will not.

Troubleshooting decision matrix

Map the observed TLS-RPT failure type or operator symptom to the diagnostic next step:

  • Symptom: TLS-RPT reports show sts-policy-fetch-error.
    Diagnosis: Senders cannot fetch the policy file. Either the HTTPS endpoint is unreachable, the certificate is invalid, the Content-Type is wrong, or the mta-sts subdomain DNS does not resolve.
    Fix: Run curl -v https://mta-sts.<your-domain>/.well-known/mta-sts.txt — confirm 200 OK with content-type: text/plain and a Let's Encrypt / DigiCert / Google Trust Services certificate chain.
  • Symptom: TLS-RPT reports show sts-policy-invalid.
    Diagnosis: The policy file is reachable but does not parse. Possible causes: UTF-8 BOM at file head, comments (# lines) in the file, capital-letter Mode: Enforce, missing version: or max_age: key, malformed line endings.
    Fix: Re-save the policy file with a BOM-free editor, confirm only the four canonical keys appear, confirm all values are lowercase. See MTA-STS policy file syntax for the full byte-level reference.
  • Symptom: TLS-RPT reports show sts-webpki-invalid or certificate-host-mismatch.
    Diagnosis: The certificate at mta-sts.<your-domain> either does not validate against the public PKI (self-signed, private CA, missing intermediates) or its Subject CN / SAN does not include mta-sts.<your-domain> exactly.
    Fix: Run openssl s_client -connect mta-sts.<your-domain>:443 -servername mta-sts.<your-domain> — confirm the chain bundles intermediates and the end-entity certificate matches the hostname. Provision a fresh Let's Encrypt certificate specifically for the mta-sts subdomain (Firebase Hosting and Cloud Run autoprovision; Cloud Storage + Cloud CDN requires explicit Google-managed certificate setup on the load balancer).
  • Symptom: Mail bounces with "TLS required but not available" or "MTA-STS enforcement failure" after promoting to enforce.
    Diagnosis: The mx: directive enumerates a hostname that does not match the actual MX target, or the actual MX target does not advertise STARTTLS with a valid certificate.
    Fix: Run dig +short MX <your-domain> — confirm every returned MX hostname appears in the mx: directive verbatim. For the legacy Workspace MX configuration that means five lines (aspmx.l.google.com plus alt1.aspmx.l.google.com through alt4.aspmx.l.google.com); for simplified that means a single smtp.google.com. Revert to mode: testing temporarily if the bounce rate is impacting business.
  • Symptom: No TLS-RPT reports arrive even after 7 days.
    Diagnosis: Either the domain has insufficient inbound mail from MTA-STS-honoring senders (low-traffic domain), the _smtp._tls TXT record is mis-published (missing leading underscore, wrong scheme prefix on rua=, missing version tag), or the rua= mailbox is unreachable.
    Fix: Verify dig +short TXT _smtp._tls.<your-domain> returns "v=TLSRPTv1; rua=mailto:<mailbox>". See TLS-RPT DNS record syntax for the full byte-level reference.

Frequently asked questions

How do I enable MTA-STS on Google Workspace?
Four steps. (1) Publish the MTA-STS DNS TXT record at _mta-sts.<your-domain> with value "v=STSv1; id=<unique-token>" (the id-token changes whenever the policy file is updated). (2) Stand up an HTTPS endpoint at mta-sts.<your-domain> (Google Workspace does NOT host the policy file — typical hosts are Google Cloud Storage + Cloud CDN, Cloud Run, Firebase Hosting, Cloudflare Pages, GitHub Pages, AWS S3+CloudFront, or any commodity HTTPS host with a publicly-trusted certificate). (3) Serve the policy file at https://mta-sts.<your-domain>/.well-known/mta-sts.txt with Content-Type text/plain, containing version: STSv1, mode: testing (initially) or mode: enforce (once burned in), one mx: line per MX host that handles your inbound mail (for Workspace tenants this is typically aspmx.l.google.com plus alt1-4.aspmx.l.google.com — five MX entries in total for the standard inbound MX set), and max_age: 86400 (24 hours) initially, increasing to 604800 (one week) or higher once stable. (4) Publish a TLS-RPT record at _smtp._tls.<your-domain> with v=TLSRPTv1; rua=mailto:tls-reports@<your-domain> so senders report TLS handshake failures and policy-fetch failures back to you. Google Workspace has NO Admin Console MTA-STS panel — all configuration is DNS + external HTTPS.
What MX hosts should I list in my Google Workspace MTA-STS policy?
The exact MX hostname(s) Google published for your tenant's accepted domains. Run dig +short MX <your-domain> to see the canonical values. For a standard Workspace tenant with no third-party security gateway, you will see five MX targets: 1 aspmx.l.google.com., 5 alt1.aspmx.l.google.com., 5 alt2.aspmx.l.google.com., 10 alt3.aspmx.l.google.com., 10 alt4.aspmx.l.google.com. — all five must appear in the mx: directive of your MTA-STS policy file (each on its own line). Workspace tenants migrated to the newer simplified MX configuration see a single target: 1 smtp.google.com. — in that case enumerate only smtp.google.com. For multi-domain Workspace tenants, each accepted domain needs its own MTA-STS policy with its own mx: list — the policies do NOT inherit across the tenant. For tenants behind a third-party security gateway (Mimecast, Proofpoint, Barracuda, FortiMail), list the gateway MX hostnames instead. The mx: directive is an enumeration — only listed hostnames can deliver mail under MTA-STS enforcement.
Where do I host the MTA-STS policy file for a Google Workspace tenant?
Anywhere that can serve a static text file over HTTPS with a publicly-trusted certificate matching mta-sts.<your-domain>. Google Workspace does NOT host the file natively — Gmail is a mail platform, not a web platform; there is no Drive / Sites / Admin Console route to publish a /.well-known/mta-sts.txt file on the mta-sts subdomain. Operators commonly use: (a) Google Cloud Storage with Cloud CDN (Workspace-aligned, supports custom-hostname HTTPS via Cloud Load Balancing), (b) Cloud Run (free tier, autoprovisions HTTPS), (c) Firebase Hosting (free tier, instant custom-domain HTTPS via Let's Encrypt), (d) Cloudflare Pages or Cloudflare Workers (free tier, supports custom-hostname HTTPS), (e) GitHub Pages with a custom domain (auto-HTTPS via Let's Encrypt, free for public repositories), (f) AWS S3 with CloudFront for the certificate front-end, (g) Netlify or Vercel static hosting, (h) any commodity LAMP / NGINX host where you already run a website. The hostname must be exactly mta-sts.<your-domain> (not www.mta-sts or mta-sts1 — the convention is locked by RFC 8461). The certificate at that hostname must validate against the public PKI; a self-signed cert or a wildcard cert that doesn't cover mta-sts.<your-domain> causes sts-webpki-invalid in TLS-RPT reports and silent policy rejection.
Why does my MTA-STS policy fetch fail with a certificate error for a Workspace tenant?
Most likely the certificate at mta-sts.<your-domain> does not match the hostname being fetched, has expired, or was issued by a CA outside the public PKI trust store. Diagnose with three commands. (1) openssl s_client -connect mta-sts.example.com:443 -servername mta-sts.example.com -showcerts </dev/null returns the served certificate chain — verify the Subject CN or SAN includes mta-sts.example.com (NOT just example.com — wildcards must be *.example.com explicitly, not example.com on its own). (2) curl -v https://mta-sts.example.com/.well-known/mta-sts.txt returns the served file — verify the HTTP/2 status is 200 OK and the Content-Type is text/plain. (3) curl -v --cacert /path/to/empty.pem https://mta-sts.example.com/.well-known/mta-sts.txt with an empty CA store fails — verify the certificate chain bundles intermediates (a common oversight: serving only the end-entity certificate without the intermediate chain so commodity clients without the intermediate cached in their TLS stack fail validation). Google Workspace itself does NOT supply or proxy the certificate for the mta-sts.<domain> subdomain — operators must obtain and serve it from the chosen HTTPS host. Firebase Hosting and Cloud Run autoprovision certificates via Let's Encrypt; Google Cloud Storage + Cloud CDN requires explicit certificate provisioning via Cloud Load Balancing.
Does Google Workspace honor MTA-STS policies when sending mail outbound (does Gmail enforce MTA-STS as a sender)?
Yes. Gmail (the Workspace outbound platform) has acted as an MTA-STS-honoring SENDER since 2018: when delivering mail outbound to a recipient domain that has published an MTA-STS policy (either at <domain> directly or at a recipient-side accepted domain), Gmail (a) fetches the recipient's policy at https://mta-sts.<recipient-domain>/.well-known/mta-sts.txt, (b) caches it for the policy's max_age, (c) enforces the policy on outbound TLS sessions for that domain (refuses to deliver over plaintext or with an unauthenticated certificate when mode: enforce is in effect), and (d) emits TLS-RPT reports back to the recipient's rua= mailbox detailing every TLS handshake failure or policy-fetch failure observed. This means recipients running Google Workspace receive MTA-STS-enforced delivery from any sender whose outbound system honors MTA-STS (Google Workspace, Microsoft 365, Yahoo, ProtonMail, and most modern commercial MTAs). Google was an early implementer of the sender side; current Workspace tenants honor recipient MTA-STS by default with no operator configuration. Gmail caps max_age it honors at 604800 (one week) per public documentation — policies advertising a longer max_age are honored only for the first 604800 seconds.
How do I verify my Google Workspace MTA-STS deployment is working?
Five verification gates. (1) DNS: dig +short TXT _mta-sts.<your-domain> must return "v=STSv1; id=<token>". (2) HTTPS endpoint: curl -v https://mta-sts.<your-domain>/.well-known/mta-sts.txt must return HTTP/2 200 OK with Content-Type text/plain and the four canonical keys (version: STSv1, mode:, mx:, max_age:). (3) Certificate: openssl s_client -connect mta-sts.<your-domain>:443 -servername mta-sts.<your-domain> must return a chain whose end-entity certificate Subject CN or SAN includes mta-sts.<your-domain> and validates against the public PKI. (4) Policy file content: the mx: directive must enumerate every hostname that appears in dig +short MX <your-domain> — typically aspmx.l.google.com plus alt1-4.aspmx.l.google.com for a standard Workspace tenant (or smtp.google.com for the simplified config). (5) End-to-end TLS-RPT: 24-72 hours after publication, the rua= mailbox at _smtp._tls.<your-domain> begins receiving JSON reports from major senders (Google, Microsoft 365, Yahoo) detailing policy-fetch success, TLS handshake outcomes, and failure-details for any handshake or policy-fetch errors. Empty or absent TLS-RPT reports means either (a) no senders have attempted delivery yet (low-traffic domain), or (b) the rua= mailbox is mis-published or the receiving endpoint refuses inbound mail.
Can I use the Google Workspace Admin Console to configure MTA-STS?
No. The Google Workspace Admin Console (admin.google.com) has panels for DKIM (Apps > Google Workspace > Gmail > Authenticate email), DMARC (the Postmaster Tools dashboard at postmaster.google.com surfaces DMARC posture, but DMARC records are published at the operator's DNS), and SPF (no panel — published purely at DNS), but it has NO MTA-STS panel. MTA-STS is a recipient-side hardening protocol: the recipient publishes a DNS TXT record at _mta-sts.<domain> and serves a policy file at https://mta-sts.<domain>/.well-known/mta-sts.txt, and senders honor that policy when delivering mail to the recipient. Google Workspace (the recipient platform) provides MX hosts (aspmx.l.google.com plus alt1-4) that operators enumerate in their policy mx: directive, but Google does NOT publish the DNS record or host the policy file on the operator's behalf. All MTA-STS configuration for a Workspace tenant is operator-driven at the DNS and HTTPS layers — there is no gcloud command (no gcloud workspace mta-sts), no Admin Console toggle, no Postmaster Tools panel. The pragmatic workflow: publish the DNS record at your authoritative nameserver, stand up an HTTPS host for the policy file (Cloud Run / Firebase Hosting are the Workspace-aligned choices), observe via TLS-RPT — all entirely outside the Google administrative surface.

Verify MTA-STS on your Google Workspace tenant now

DMARC Analyzer ingests TLS-RPT JSON reports sent to your rua= mailbox at _smtp._tls.<your-domain> via includes/TlsRptParser.php and surfaces per-sender policy-fetch success, certificate-validation outcomes, and STARTTLS handshake breakdown — catching sts-policy-fetch-error, sts-policy-invalid, sts-webpki-invalid, and certificate-host-mismatch within hours of the first failure. Live DNS verification for the _mta-sts and _smtp._tls records runs through includes/DnsChecker.php; the Email Header Analyzer at header_analyzer.php diagnoses individual TLS handshake failures by parsing the Received: ... (using TLSv1.3 ...) stack via includes/EmailHeaderParser.php.

Sign up — Free plan Check my Google Workspace MTA-STS setup