Skip to main content
wp-config.org

Search tools

Email tools

MTA-STS and TLS-RPT generator and checker

Build the MTA-STS policy file and DNS records that make other mail servers deliver to you only over an encrypted, verified connection, plus a TLS reporting record. Then test the policy, its certificate and your mail servers.

  • Policy file builder
  • Certificate and redirect checks
  • TLS reporting

Free, no sign-up. Results are not saved.

This tool needs JavaScript. Turn JavaScript on and reload the page.

Email DNS

What gets your email delivered in 2026

  • Gmail and Yahoo ask every sender for SPF or DKIM. Bulk senders (for Gmail, about 5,000 or more messages a day to Gmail accounts) also need both SPF and DKIM, a DMARC record (p=none at least) aligned with SPF or DKIM, and one-click unsubscribe for marketing mail. Since November 2025 Gmail has been stepping up enforcement, including rejecting mail that does not comply.
  • Outlook.com, Hotmail and Live ask domains that send more than 5,000 messages a day for passing SPF and DKIM and DMARC p=none or stronger, aligned with one of them. Since 5 May 2025 mail that fails goes to Junk.
  • Mail from your WordPress site (password resets, orders, contact forms) counts too: send it through an SMTP plugin and an email service that is in your SPF and DKIM records.

What you can do

  • Build the MTA-STS policy file and its TXT record

  • Add a TLS-RPT record for daily TLS reports

  • Check the policy file, its HTTPS certificate and its content type

  • Catch redirects that senders refuse to follow

  • Confirm every MX host matches an mx: line in the policy

  • See when you are ready to move from testing to enforce

How to set up MTA-STS and TLS reporting

  1. Build the policy and records

    Choose testing mode, how long senders keep the policy, and a TLS report address. The mail servers are filled in from your mailbox provider, or from your MX records after a test.

  2. Host the policy file

    Serve the file at https://mta-sts.yourdomain/.well-known/mta-sts.txt with a valid certificate for that name, then publish the _mta-sts and _smtp._tls TXT records.

  3. Test, then enforce

    After a quick Cloudflare security check, the test fetches the policy and checks it against your MX records. Once TLS reports show no failures, switch to enforce and change the id.

How MTA-STS and TLS reporting protect your mail

Mail servers usually encrypt mail on its way to you, but by default they fall back to sending it unencrypted, or to a server with a bad certificate, if the secure connection fails. An attacker in the middle can force that. MTA-STS (RFC 8461) lets your domain say: only deliver to these mail servers, over TLS with a valid certificate. TLS reporting (TLS-RPT, RFC 8460) tells you when senders could not do that.

The three parts

  • A TXT record at _mta-sts.yourdomain, such as v=STSv1; id=20261112T120000. The id is 1 to 32 letters and digits. Change it every time you change the policy, or senders keep the old one.
  • The policy file at https://mta-sts.yourdomain/.well-known/mta-sts.txt, with the lines version: STSv1, mode, one mx: line for each mail server, and max_age in seconds, up to 31557600 (about a year).
  • A TXT record at _smtp._tls.yourdomain, such as v=TLSRPTv1; rua=mailto:tls-reports@example.com, for the daily reports.

Rules that catch people out

  • mta-sts.yourdomain needs its own valid certificate. A certificate only for www or the bare domain is not enough. Check it with the SSL checker.
  • Senders do not follow redirects. The file must answer with status 200, as text/plain, at exactly that address.
  • *.example.com in an mx: line matches exactly one label, such as mx1.example.com, but not example.com or a.b.example.com.
  • Every host in your MX records must match an mx: line, or senders that enforce the policy refuse to deliver to it.

Testing, then enforce

Start in mode: testing with a short max_age, such as a day. Senders report problems but still deliver. When TLS reports show no failures for a couple of weeks, change to mode: enforce, raise max_age to a week or more, and update the id in the TXT record.

On WordPress hosting

Host the policy on a separate tiny site for mta-sts.yourdomain rather than inside WordPress, so no plugin or HTTPS rule redirects it. If you use Cloudflare, make sure no redirect rule catches it either.

Frequently asked questions

Do I need MTA-STS?

It is not required to deliver email, but it protects mail sent to you from being read or redirected on the way. Set up SPF, DKIM and DMARC first, then add MTA-STS and TLS reporting.

What should the MTA-STS id be?

Any 1 to 32 letters and digits, with no dashes or dots. The date and time you last changed the policy works well, such as 20261112T120000. Change it whenever you change the policy file.

Why does the test say my policy file redirects?

Senders must not follow redirects, so a redirect makes the policy unreachable. WordPress, a plugin or an HTTPS rule often redirects mta-sts to www or to the main site. Serve the file directly at https://mta-sts.yourdomain/.well-known/mta-sts.txt with status 200.

What max_age should I use?

While testing, a day lets changes reach senders quickly. Once the policy works, use a week or more. The largest value allowed is 31557600 seconds, about a year.

What does TLS-RPT report?

Sending servers send a daily report of the encrypted connections they made to your mail servers, and any that failed, to the address in rua. Without it, a broken certificate or policy can go unnoticed.

Is the domain I check stored?

The result is not saved. The MTA-STS policy, BIMI logo and certificate the test downloads are read once and not kept. To count how the tool is used, this site keeps the domain you tested for 12 months, with the time, the outcome, your approximate location (country, region and city), the site you came from and your type of device and browser, but no IP address, and never the services or DKIM selectors you picked. The privacy policy has the details.

Related tools

  • Look up DNS records and check SPF, DMARC, DKIM and DNSSEC.

  • Email header decoder

    New (added recently)

    Paste an email’s full headers to see its delivery path, delays, SPF, DKIM, DMARC and ARC results, alignment and spam scores, decoded in your browser.

  • Blacklist checker

    New (added recently)

    Check whether an IP address or a domain’s website and mail servers are on spam blocklists, with what each listing means and how to get removed.

  • DNS propagation checker

    New (added recently)

    Check whether a DNS change has reached Google, Cloudflare, Quad9 and other public resolvers, and when each one refreshes.