LearnPart 6 of 8

How a domain becomes an email address

Email reaches your domain because of its MX records, which name the mail server that accepts its messages. Three more records, SPF, DKIM and DMARC, prove that mail sent from your domain is really from you. Your domain can have email without having a website.

In 30 seconds

  • Everything after the @ in an email address is a domain.
  • The domain's MX records say which server receives its mail.
  • SPF, DKIM and DMARC records prove mail from your domain is really from you, so it lands in the inbox.
  • You don't need a website to have email on your domain.

Words with a dotted underline explain themselves: tap or hover them.

The parts of an email address

Everything after the @ is a domain name. Everything before it is the mailbox name, which only the receiving email provider cares about. The domain decides where the mail goes; the mailbox name decides who gets it once it arrives.

Try

Everything happens in your browser; nothing you type is sent or saved.

hellomailbox@ examplename.comtop level

This email address belongs to the domain example.com.

Registered domainexample.com
Hostnameexample.com
Extension.com
LevelsOne-level extension
TypeGeneric (gTLD)
Run byVerisign
Mail goes toThe servers in the MX records of example.com

How an email travels

The sender's app hands the message to its mail server over SMTP. That server looks up the recipient domain's MX record and delivers over SMTP on port 25. The receiving server checks SPF, DKIM and DMARC and stores the message in the mailbox, where the recipient's app reads it over IMAP.SMTP, port 587 or 465MX lookup, then SMTP on port 25checks SPF, DKIM and DMARCIMAP, port 993Sender's email appSender's mail serverMail server in the MX recordMailboxRecipient's email app
Two kinds of protocol: SMTP moves mail between servers, IMAP (or POP3) lets your app read it. DNS tells the sending server where to deliver and how to check the sender.
  1. You press send. Your email app hands the message to your provider's mail server over , signing in first.
  2. Your provider looks up the MX records of the recipient's domain, the part after the @, to find their mail server.
  3. It delivers the message to that server, also over SMTP, normally encrypted with TLS.
  4. The receiving server checks the sender: does the sending server appear in the domain's SPF record, does the DKIM signature match, and what does its DMARC policy say? Then it files the message in the inbox, in spam, or rejects it.
  5. The recipient's app fetches it over (or the provider's own app and API).

MX records: where your mail goes

An MX record says "mail for this domain goes to this server", with a priority number. Senders try the lowest number first and fall back to higher ones:

NameTypePriorityMail server
@MX10mx1.mail-provider.example
@MX20mx2.mail-provider.example

Your email provider gives you these values. An MX record must point at a hostname, never an IP address or a CNAME. A domain with no MX record at all gets mail at the address in its A record, which rarely runs a mail server, so set MX records even if you only forward.

Mailbox or forwarding?

MailboxForwarding
What it doesStores mail with an email provider. You read and send from it.Passes each message on to an inbox you already have.
Good forAnything you rely on: work, support, sign-ins.A side project, a personal domain, extra aliases.
Sending as the addressBuilt in.Needs extra setup at the inbox you forward to, or replies come from that address instead.
Where it's set upMX records point at the provider.MX records point at your registrar's or a forwarding service.

A catch-all delivers mail for any address at your domain, even ones you never set up. It is handy for spotting who shared your address, and also catches a lot of spam.

SPF: who may send as your domain

SMTP lets any server claim to send mail from any domain, which is how spam and phishing began. SPF (Sender Policy Framework) fixes part of that: a TXT record on your domain that lists the servers allowed to send its mail.

v=spf1 include:_spf.mail-provider.example include:newsletter.example ~all

  • Each include: adds a service that sends for you: your mailbox provider, newsletter tool, invoicing app.
  • ~all means mail from anywhere else is suspicious; -all means reject it.
  • Keep exactly one SPF record per name, and no more than 10 lookups inside it.

Build and check one in the SPF guide.

DKIM: a signature on every message

DKIM (DomainKeys Identified Mail) adds a cryptographic signature to each message. The receiving server fetches your public key from DNS, at a name like selector1._domainkey.example.com, and checks the signature. If it matches, the message really came from a server holding your private key and wasn't altered on the way.

You don't make keys yourself: each sending service gives you a TXT or CNAME record to add, with its own selector, so several services can sign for you at once. Details in the DKIM guide.

DMARC: what to do with fakes

DMARC ties SPF and DKIM to the address people actually see in the From line, and tells receivers what to do when a message fails: deliver it anyway, send it to spam, or reject it. It is a TXT record at _dmarc.example.com:

v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com

  • p=none only collects reports, which arrive daily from the big providers and show every service sending as your domain.
  • Once everything legitimate passes, move to p=quarantine (spam folder), then p=reject (blocked).

Large mailbox providers ask anyone sending to them in volume to have SPF, DKIM and DMARC in place. Set all three up once and your mail is far more likely to land in the inbox.

Policy options and a builder are in the DMARC guide.

A complete setup, record by record

A typical domain with one email provider and one newsletter tool:

NameTypeValueDoes
@MX10 mx1.mail-provider.exampleReceive mail
@MX20 mx2.mail-provider.exampleBackup receiving server
@TXTv=spf1 include:_spf.mail-provider.example include:newsletter.example ~allSPF
selector1._domainkeyCNAMEselector1.dkim.mail-provider.exampleDKIM for mailboxes
nl._domainkeyTXTv=DKIM1; k=rsa; p=MIIBIjANBg…DKIM for the newsletter
_dmarcTXTv=DMARC1; p=quarantine; rua=mailto:dmarc@example.comDMARC

Optional extras: MTA-STS and TLS-RPT require encrypted delivery and report problems, and BIMI shows your logo next to your messages in some inboxes. Check any domain's email setup with the free email checker.

Protecting domains that don't send email

Domains you hold but don't use for email can still be faked in the From line. Three records tell the world they never send or receive mail:

NameTypeValue
@MX0 .
@TXTv=spf1 -all
_dmarcTXTv=DMARC1; p=reject

The MX record with a single dot is a "null MX": it tells senders straight away that the domain accepts no mail.

When email goes wrong

What happensUsual cause
Mail to you bounces with "domain not found"No MX records, or the domain has expired.
Mail stopped after changing nameserversThe MX records weren't copied to the new DNS host.
Your mail lands in spamMissing SPF, DKIM or DMARC, or a sending service isn't in your SPF record.
Some services' mail fails, others passThat service isn't in SPF or isn't signing with DKIM for your domain.
Replies to forwarded mail show your personal addressForwarding only receives; set up sending as the address at your inbox.

Next: the protocols behind all of this, in the protocols guide.

Questions people ask

Can I have email on my domain without a website?

Yes. Email only needs MX records pointing at an email provider (plus SPF, DKIM and DMARC). The domain doesn't need a website at all.

What is an MX record?

A DNS record that names the mail server accepting email for a domain, with a priority number. Sending servers look it up for every message, and try the lowest number first.

Do I need SPF, DKIM and DMARC?

Yes, if you send email from your domain. Large mailbox providers expect all three and send unauthenticated mail to spam or reject it, and DMARC also stops others sending as your domain.

What is the difference between a mailbox and email forwarding?

A mailbox stores your mail with an email provider, and you read and send from it. Forwarding stores nothing: it passes each message on to another address you already have, such as a personal inbox.

Can I use two email providers on one domain?

Not for the same addresses: MX records send all of a domain's mail to one service. You can give a subdomain, like mail for support.example.com, its own MX records, or have one provider route certain addresses to another.

Why does my email go to spam?

Usually missing or failing authentication: no SPF record, a service that sends for you isn't in it, no DKIM signature, or no DMARC record. A free email check shows which one is missing.

Keep every domain you own in one place.

Lemon Domains brings your domains from 95 registrars into one list, tracks expiry dates and changes, and lets your AI assistant answer questions about them.