How-to guide

How to find a domain’s mail server and test it

Look up MX records, read their priorities, and check the servers accept encrypted connections.

Email and IT admins, developers4 min readUpdated
Short answer

Look up the domain’s MX records. Each one names a mail server and a priority number, and senders try the lowest number first. Then test each server: it should resolve to an address, accept a connection, offer STARTTLS with a valid certificate and have reverse DNS.

Reading MX records

  • Each MX record has a priority (lower is tried first) and a hostname.
  • Equal priorities share the load; a higher number is a backup.
  • Google Workspace shows smtp.google.com (or the older aspmx.l.google.com set); Microsoft 365 shows yourdomain-com.mail.protection.outlook.com.
  • The hostname reveals the mail provider, which is often the quickest way to tell who handles a company’s email.

Common MX mistakes

  • An MX pointing at a CNAME or an IP address instead of a hostname with A or AAAA records. Both break the standard.
  • Old MX records left behind after moving providers, so some mail goes to a server nobody reads.
  • A backup MX with weaker spam filtering, which spammers target on purpose.
  • A domain that sends no email should publish a null MX (priority 0, a single dot) to say so.

Testing the server

Server-to-server mail uses port 25, which most cloud and home networks block, so online tests often check the submission ports 587 and 465 instead. A good result shows the server’s greeting, STARTTLS offered, TLS 1.2 or 1.3, and a certificate that matches the hostname and hasn’t expired.

Questions people ask

How do I find out what email provider a domain uses?
Look up its MX records. The mail server names usually reveal the provider, such as google.com or outlook.com.
What does MX priority mean?
The order senders try the servers in. The lowest number is tried first; higher numbers are backups.
Can a domain have no MX record?
Yes. Senders then try the domain’s own address (A record). If the domain never receives mail, publish a null MX instead.
How do I test an SMTP server?
Use an SMTP test: it connects to the server, reads the greeting, tries STARTTLS and checks the certificate, without sending an email.

Sources and further reading

Written by the middle.network team, who build and run these tools. Last checked 2026-11-21.