Skip to main content
InboxkitSign up free

Free tool

MTA-STS checker

MTA-STS tells other mail servers that your domain accepts mail only over verified TLS, so a message to you cannot be quietly downgraded to plain text or routed to a fake server. This free MTA-STS checker tests both halves of the setup: the _mta-sts TXT record and the policy file it points to.

Want TLS-RPT, BIMI and DMARC checked in the same pass? Run the domain scanner.

What this checker tests

DNS Record

Finds the v=STSv1 TXT record at _mta-sts.yourdomain.com and reads its id

Policy File

Checks the policy file at https://mta-sts.yourdomain.com/.well-known/mta-sts.txt

Recommendations

Lists what to fix next, marked critical, warning or info

How to use the MTA-STS checker

  1. Step 1

    Enter the domain

    Type the domain that receives your mail, such as yourdomain.com. A pasted https:// prefix or trailing slash is stripped for you.

  2. Step 2

    Run the check

    Click Check MTA-STS or press Enter. The checker looks up the TXT record at _mta-sts.yourdomain.com and the policy file it points to.

  3. Step 3

    Read both cards

    DNS Record shows the raw v=STSv1 record and its policy id. Policy File shows the URL senders fetch, with a link to open it.

  4. Step 4

    Fix and re-check

    Work through Issues Found, Warnings and Recommendations, then click New Check once your DNS change has propagated.

What this MTA-STS checker tests

The _mta-sts TXT record

Finds the TXT record that contains v=STSv1, shows it as published and reads the id. A missing id is an error, and an id outside 1 to 32 characters is a warning.

The policy file

Checks the policy at https://mta-sts.yourdomain.com/.well-known/mta-sts.txt over HTTPS and reads its version, mode, mx and max_age lines. The result links to the file so you can open it yourself.

What to fix next

Recommendations marked critical, warning or info, from a missing record or policy to adding TLS-RPT. The checker does not look up TLS-RPT or validate DNSSEC itself.

The two parts of MTA-STS, with examples

A sending server that supports MTA-STS first looks up a TXT record to learn that your domain has a policy, then downloads the policy over HTTPS. Both have to be in place, and the policy has to match your real MX records.

1. The DNS record

A TXT record at _mta-sts. It holds the version and an id of 1 to 32 letters and digits. A timestamp works well as the id.

Host:  _mta-sts.yourdomain.com
Type:  TXT
Value: v=STSv1; id=20261027T120000;

2. The policy file

A plain text file served at https://mta-sts.yourdomain.com/.well-known/mta-sts.txt. This example is for a Google Workspace domain:

version: STSv1
mode: testing
mx: aspmx.l.google.com
mx: *.aspmx.l.google.com
max_age: 86400
FieldWhat it does
versionAlways STSv1.
modetesting, enforce or none. See the rollout below.
mxOne line per MX host. A wildcard covers one label only: *.aspmx.l.google.com matches alt1.aspmx.l.google.com but not aspmx.l.google.com, so list both. Microsoft 365 domains use *.mail.protection.outlook.com.
max_ageHow long senders cache the policy, in seconds, up to 31557600 (about a year).

Testing vs enforce vs none: a safe rollout

mode: testing

Senders still deliver when TLS or the certificate fails, and report the failure through TLS-RPT. Start here.

mode: enforce

Senders refuse to deliver to an MX host that fails TLS validation or is not listed in the policy.

mode: none

Tells senders to drop any cached policy. Use it to switch MTA-STS off without breaking delivery.

  1. Publish TLS-RPT first so you get reports from day one.
  2. Get an HTTPS certificate for mta-sts.yourdomain.com and serve the policy file in testing mode with max_age: 86400.
  3. Add the _mta-sts TXT record and confirm both parts with the checker above.
  4. Read TLS-RPT reports for two to four weeks. Every MX host should show successful TLS sessions and no policy errors.
  5. Switch to mode: enforce, raise max_age to a week or more (604800), and change the id in the TXT record.
  6. To back out later, serve mode: none with a new id and keep it online until the old max_age has passed, then remove both parts.

TLS-RPT: reports on TLS failures

TLS-RPT (RFC 8460) is a TXT record that asks sending servers to email you a daily JSON summary of successful and failed TLS sessions to your domain. Google and Microsoft both send them. Without it, testing mode tells you nothing.

Host:  _smtp._tls.yourdomain.com
Type:  TXT
Value: v=TLSRPTv1; rua=mailto:tls-reports@yourdomain.com

This checker does not read the TLS-RPT record. The domain scanner does, alongside MTA-STS, DMARC and BIMI.

Common MTA-STS errors and how to fix them

ErrorWhy it happensFix
Policy host has no valid HTTPS certificateSenders only accept a policy served with a publicly trusted certificate that covers mta-sts.yourdomain.com. A certificate for the apex or www, a self-signed one or an expired one fails.Issue a certificate for mta-sts.yourdomain.com from your host or a public CA and serve the full chain.
Wrong content typeThe policy must be served as text/plain. Some hosts send text/html or application/octet-stream for files in .well-known.Set Content-Type: text/plain for /.well-known/mta-sts.txt.
mx lines do not match MX recordsIn enforce mode senders refuse any MX host that no mx line matches. Common after a mail provider change, or when a wildcard is expected to cover the bare host.Compare dig +short MX yourdomain.com with the mx lines and add one for every host.
id not changed after a policy editSenders keep the cached policy for max_age seconds and only fetch it again when the id changes.Change the id in the _mta-sts TXT record every time you edit the policy file.
Redirects or a broken CNAMESenders do not follow HTTP redirects, so a 301 to www or another path fails. A CNAME on mta-sts to a hosting provider is fine only if that host serves your certificate and the file.Serve the file directly with a 200. If a provider hosts it, check their certificate covers mta-sts.yourdomain.com.
More than one v=STSv1 recordIf _mta-sts returns two records that start with v=STSv1, senders treat the domain as having no policy.Keep exactly one MTA-STS TXT record.

How to debug an MTA-STS policy fetch error

A policy fetch error means a sender found your TXT record but could not download a valid policy. Repeat the sender's steps from a terminal:

  1. Check the TXT record. There should be exactly one result, starting with v=STSv1.
    dig +short TXT _mta-sts.yourdomain.com
  2. Fetch the policy over HTTPS. Look for a certificate that verifies, HTTP 200 with no redirect, Content-Type: text/plain, and a body that starts with version: STSv1.
    curl -sv https://mta-sts.yourdomain.com/.well-known/mta-sts.txt
  3. Compare the mx lines with your MX records. The DNS checker lists them, or run:
    dig +short MX yourdomain.com
  4. Read the TLS-RPT failure type. sts-policy-fetch-error means the file could not be downloaded, sts-policy-invalid means it downloaded but did not parse, and sts-webpki-invalid points at the certificate on the policy host.
  5. Change the id after the fix so senders that cached an older policy fetch the new one.

FAQ

Frequently asked questions

MTA-STS (Mail Transfer Agent Strict Transport Security, RFC 8461) lets a domain tell sending mail servers that its MX hosts support TLS and that mail should only be delivered over a verified, encrypted connection. It protects mail coming in to your domain from downgrade and interception attacks, where an attacker strips STARTTLS or points the sender at a fake server.

Enter the domain in the checker above and click Check MTA-STS. It looks up the TXT record at _mta-sts.yourdomain.com and links to the policy file at https://mta-sts.yourdomain.com/.well-known/mta-sts.txt. To test by hand, run dig +short TXT _mta-sts.yourdomain.com, then curl -sv https://mta-sts.yourdomain.com/.well-known/mta-sts.txt and confirm a 200 response, a valid certificate and a body that starts with version: STSv1.

It is a plain text file with one key: value pair per line. A working example: version: STSv1, mode: testing, mx: aspmx.l.google.com, mx: *.aspmx.l.google.com, max_age: 86400, each on its own line. version, mode and max_age appear once; add one mx line for every MX host or wildcard pattern your domain uses.

In testing mode, senders that support MTA-STS still deliver mail when TLS or the certificate fails, but report the failure through TLS-RPT. In enforce mode they refuse to deliver to an MX host that fails validation or is not listed in the policy. None tells senders to drop any cached policy, and is how you switch MTA-STS off safely.

max_age is how long, in seconds, senders cache your policy. The maximum is 31557600 (about a year). Use a short value such as 86400 (one day) while in testing mode so mistakes expire quickly, then raise it to one or two weeks (604800 or 1209600) or longer once the policy is in enforce mode and stable.

It is not required, but without it you cannot see what testing mode is telling you. TLS-RPT is a TXT record at _smtp._tls.yourdomain.com, for example v=TLSRPTv1; rua=mailto:tls-reports@yourdomain.com. Providers such as Google and Microsoft then send a daily JSON report of successful and failed TLS sessions to that address. Publish it before or alongside your MTA-STS policy.

Fetch the policy the way a sender does: curl -sv https://mta-sts.yourdomain.com/.well-known/mta-sts.txt. The certificate must be valid for mta-sts.yourdomain.com, the response must be a 200 with no redirect, the Content-Type must be text/plain, and the body must start with version: STSv1. TLS-RPT reports name the failure type, for example sts-policy-fetch-error, sts-policy-invalid or sts-webpki-invalid, which tells you which of those checks failed.

Senders cache the policy for max_age seconds and only fetch it again when the id in the _mta-sts TXT record changes. Every time you edit the policy file, change the id too, for example to a new timestamp such as 20261027T120000. The id can be 1 to 32 letters and digits.

Not directly. MTA-STS secures mail that other servers send to your domain, so it does not change inbox placement for the cold email you send out. For outbound placement, SPF, DKIM and DMARC on the sending domain, warmed-up mailboxes and low bounce and complaint rates matter far more. MTA-STS is worth adding to the domains where you receive replies.

Authenticated sending domains from day one

Inboxkit sets up SPF, DKIM and DMARC automatically and watches blacklists and DNS on every sending domain.