How to set up business email on your own domain
An address like you@yourcompany.com looks more trustworthy than a free webmail address, and it stays yours if you change providers. This guide works with any email host. It takes about an hour of work, plus time for DNS to update.
What you need
- A domain you own, for example
yourcompany.com. - Login to the DNS settings for that domain (at your registrar or DNS host, such as Cloudflare).
- An email hosting provider. Your provider gives you the exact record values; the steps below explain what each one does.
Step 1: Check what is already on the domain
If the domain already receives mail somewhere, changing MX records moves new mail to the new host. Look before you change anything:
dig +short MX yourcompany.com
dig +short TXT yourcompany.com
dig +short TXT _dmarc.yourcompany.com
On Windows, use nslookup -type=MX yourcompany.com. Write down what you find, so you can undo a change.
Step 2: Prove you own the domain
Most providers ask you to add a TXT record with a token they give you. It does nothing for mail flow; it only proves the domain is yours. Add it, wait a few minutes, then press the provider's verify button.
Step 3: Add the MX record (incoming mail)
The MX record tells other mail servers where to deliver mail for your domain. Point it at the host your provider gives you. A lower priority number is tried first.
Type Name Priority Value
MX yourcompany.com 10 mail.your-provider.example
Remove old MX records that point at a host you no longer use, or mail may keep going there.
Step 4: Add SPF (who may send for you)
SPF is one TXT record on the domain root that lists the servers allowed to send mail as your domain. You can have only one SPF record. If you also send from other tools (a newsletter or billing system), merge their include: into the same record.
Type Name Value
TXT yourcompany.com "v=spf1 include:_spf.your-provider.example -all"
-all tells receivers to reject mail from anyone else. Use ~all (soft fail) while you are still finding all the tools that send for you.
Step 5: Add DKIM (signed mail)
DKIM adds a signature to each message you send. Receivers check it against a public key in your DNS. Your provider gives you one or more records, either as TXT (the key itself) or CNAME (pointing at a key the provider manages):
Type Name Value
TXT selector1._domainkey.yourcompany.com "v=DKIM1; k=rsa; p=MIIBIjANBg..."
CNAME selector2._domainkey.yourcompany.com selector2.your-provider.example
Copy the values exactly. Some DNS hosts add the domain to the name for you, so selector1._domainkey may be all you type.
Step 6: Add DMARC (what to do with failures)
DMARC tells receivers what to do when a message fails SPF and DKIM, and where to send reports. Start with p=none so nothing is blocked while you watch the reports.
Type Name Value
TXT _dmarc.yourcompany.com "v=DMARC1; p=none; rua=mailto:postmaster@yourcompany.com"
After a few weeks of clean reports, move to p=quarantine, then p=reject. That stops others from sending mail that pretends to be you.
Step 7: Wait, then check the records
DNS changes usually show up within minutes, but can take up to the record's TTL (often an hour, sometimes up to a day). Check from your own machine:
dig +short MX yourcompany.com
dig +short TXT yourcompany.com | grep spf1
dig +short TXT selector1._domainkey.yourcompany.com
dig +short TXT _dmarc.yourcompany.com
Then send a test message to an address at another provider and open the message headers. Look for spf=pass, dkim=pass and dmarc=pass.
Step 8: Create mailboxes and aliases
- Mailboxes for each person, with their own password.
- Aliases such as
sales@orbilling@that deliver to one or more people, without paying for another mailbox. - Keep
postmaster@working: DMARC reports and some providers send mail there.
Step 9: Connect phones and mail apps (IMAP and SMTP)
Any standard mail app (Apple Mail, Outlook, Thunderbird, Gmail app) works with these settings. Use the server name from your provider.
| Setting | Incoming (IMAP) | Outgoing (SMTP) |
|---|---|---|
| Server | mail.your-provider.example | mail.your-provider.example |
| Port | 993 | 465 (or 587) |
| Security | SSL/TLS | SSL/TLS (STARTTLS on 587) |
| Username | Your full email address | |
POP3 (port 995) also exists, but it downloads mail to one device. Use IMAP if you read mail on more than one device.
Common mistakes
- Two SPF records on the same domain. Receivers treat that as an error. Merge them into one.
- Leaving an old MX record in place, so some mail still goes to the old host.
- Jumping straight to
p=rejectbefore every sending tool passes SPF or DKIM. - Typing the domain twice in a record name, for example
_dmarc.yourcompany.com.yourcompany.com.
Doing it with vizsu
Mail is vizsu's business email on your own domain. When you add a domain, Mail shows every record it needs with a live status next to each one, so you can see which ones are done:
- An ownership TXT record at
_vizsu.yourcompany.com. - An MX record with priority 10, an SPF record
v=spf1 include:_spf.vizsu.com -all, DKIM records, and a DMARC record that starts atp=none. - Optional records for MTA-STS, TLS reporting and mail app auto-setup.
Mailboxes connect over IMAP on port 993 and SMTP on port 465 with SSL/TLS, using your full email address as the username. There is also webmail in the browser.
Questions
Do I need to move my website to set up email?+
No. Email uses the MX, SPF, DKIM and DMARC records. Your website uses A or CNAME records. You can change one without touching the other.
How long does it take for DNS changes to work?+
Usually minutes. It can take up to the record's TTL, which is often one hour and sometimes up to a day.
Can I have more than one SPF record?+
No. A domain should have exactly one SPF TXT record. Put every sending service in it with separate include: entries.
What DMARC policy should I start with?+
Start with p=none and read the reports. Move to p=quarantine and then p=reject once all your real mail passes.
Which ports should my mail app use?+
IMAP on 993 with SSL/TLS for incoming mail, and SMTP on 465 with SSL/TLS (or 587 with STARTTLS) for outgoing mail. Use your full email address as the username.
Related
Business email · Mail · How to monitor cron jobs · All guides