Suped

Does MTA-STS require a dedicated server for its policy file?

When getting started with new email security standards, it's common to have questions about the infrastructure requirements. A frequent one I hear is about MTA-STS (Mail Transfer Agent Strict Transport Security) and whether it needs a dedicated server for its policy file. The short answer is a definitive no.

MTA-STS is a protocol that helps ensure emails are transmitted over a secure, encrypted connection, preventing man-in-the-middle attacks where an attacker could downgrade a connection to intercept or alter emails. It achieves this by allowing a domain to publish a policy that visiting mail servers must follow.

godmarc.com logo
GoDMARC Knowledge Base says:
Visit website
No, you do not need a dedicated server or hosting provider to set up MTA-STS and TLS reporting. You can set up these features using any standard...

The core of this policy is a simple text file. While this file needs to be publicly accessible via HTTPS, the resources required to host it are minimal. Let's break down why you don't need to spin up a whole new server for this and explore the more practical, modern options available.

Suped DMARC monitor
Free forever, no credit card required
Get started for free
Trusted by teams securing millions of inboxes
Company logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logoCompany logo

How the MTA-STS policy file works

To understand the hosting requirements, we first need to understand what the MTA-STS policy file is and how it's accessed. At its heart, it's a simple text file containing a few key-value pairs that define your domain's email security policy.

vand3rlinden.com logo
VAND3RLINDEN says:
Visit website
By using a policy file retrieved over HTTPS, MTA-STS allows receiving domains to specify their requirement for encrypted connections, ensuring...

The implementation of MTA-STS involves three key components working together:

  • A DNS record: A TXT record at _mta-sts.yourdomain.com signals that your domain uses MTA-STS and provides a policy ID.
  • A policy file: A plain text file named mta-sts.txt.
  • A web server: This server hosts the policy file at a very specific URL: https://mta-sts.yourdomain.com/.well-known/mta-sts.txt. The critical part is that it must be served over HTTPS with a valid TLS certificate.

The need for an HTTPS-enabled web server is what leads many to wonder if a dedicated server is necessary. But hosting a single, tiny text file is a trivial task for almost any modern web hosting solution.

Hosting options for your policy file

Since a dedicated server is overkill, let's look at the more efficient and cost-effective alternatives.

  • Use existing web hosting: If you already have a website for your domain, you can almost certainly use that same hosting plan. The process involves creating a subdomain (mta-sts.yourdomain.com), adding a TLS certificate (many hosts offer free certificates), and placing the mta-sts.txt file in the correct /.well-known/ directory.
  • Static web hosting services: Serverless solutions are perfect for MTA-STS. Services like GitHub Pages, Cloudflare Pages, AWS S3, or Azure Static Web Apps can host your policy file for free or at a very low cost. They handle the HTTPS requirement automatically, making setup straightforward.
  • Managed MTA-STS providers: For the simplest approach, you can use a service that hosts and manages the policy file and certificate on your behalf. This abstracts away all the infrastructure concerns. All you need to do is add a few DNS records that point to the managed service.
thehackernews.com logo
The Hacker News says:
Visit website
Our hosted MTA-STS provides domain owners with the following benefits: We host and manage the policy files and certificates on your behalf...

The only real requirements

Regardless of the path you choose, the technical requirements remain the same. The server that responds to mta-sts.yourdomain.com must present a valid, unexpired TLS certificate from a trusted certificate authority. Self-signed certificates will not work, as receiving mail servers will reject them.

Furthermore, the accompanying DNS TXT record must be configured correctly. Without this record, mail servers will not know to check for your MTA-STS policy file, and the entire setup will be inactive.

In conclusion, you absolutely do not need a dedicated server to implement MTA-STS. The notion is a holdover from an era before the widespread availability of flexible, low-cost cloud and hosting services. The focus should be on correct configuration, a valid certificate, and proper DNS setup, not on the underlying hardware. With so many accessible options, any organization can and should add this important layer of security to their email infrastructure.

Start improving your email deliverability today

Get started