---
title: "MX record"
description: "An MX record names the mail servers that accept email for a domain. Learn the role of priorities, links to SPF/DKIM/DMARC and email configuration."
url: "https://nodea.io/en/glossary/mx-record"
lang: "en"
updated: "2026-07-13"
---

# MX record

> An MX (Mail Exchanger) record is a DNS entry that names the mail servers accepting email addressed to a given domain.

An **MX record** (*Mail Exchanger*) is a [DNS](https://nodea.io/en/glossary/dns) entry that names the mail servers responsible for accepting email addressed to a given domain. Without a correct MX record, mail to *someone@example.com* has nowhere to go, even if the website runs flawlessly.

## How an MX record works

When a sending server wants to deliver a message, it queries DNS for the recipient domain's MX records. Each entry has two key fields:

- **priority** — a number setting the order; the lower it is, the higher the priority,
- **mail server name** — e.g. *mail.example.com*, which must resolve to an address via an [A record](https://nodea.io/en/glossary/a-record).

The sending server first tries to deliver to the host with the lowest priority; if it does not respond, it moves to the next. Importantly, the name in an MX record should point to an A record, not a CNAME — such a setup is non-standard and is sometimes rejected.

## The MX record in practice

You set an MX record whenever you enable email for a domain, whether on your own server or with an external provider. Email configuration is more than MX, though: to keep messages out of spam, the domain is supplemented with authentication records in the form of TXT entries — [SPF](https://nodea.io/en/glossary/spf), [DKIM](https://nodea.io/en/glossary/dkim) and [DMARC](https://nodea.io/en/glossary/dmarc). After changing mail providers, you update the MX records, keeping in mind the TTL-dependent propagation.

### What is the priority in an MX record for?

The priority (lower number = higher priority) sets the order in which the sender's servers try to deliver mail. The lowest value is chosen first; the others act as backups when the primary is unavailable. Several records with the same priority balance the load.

## Related

- [DNS](https://nodea.io/en/glossary/dns)
- [SPF](https://nodea.io/en/glossary/spf)
- [DKIM](https://nodea.io/en/glossary/dkim)
- [DMARC](https://nodea.io/en/glossary/dmarc)
- [A record](https://nodea.io/en/glossary/a-record)

---

Languages: [pl](https://nodea.pl/pl/slownik-pojec/rekord-mx.md)  
Site index: [llms.txt](https://nodea.io/en/llms.txt)
