Email on your own domain, and why it lands in spam
How [email protected] works, what MX, SPF, DKIM, and DMARC records do, and why your email might be going to spam.
Written by 6 min read
Browse all guides
The short version
Email on your domain is a separate service from your website. Your domain’s DNS points email to a provider like Google Workspace or Microsoft 365, and that provider runs your mailbox.
A few DNS records prove to other mail servers that your email is really from you. When they’re missing or wrong, your messages are much more likely to land in spam.
Your email and your website are separate
Your website lives with your web host. Your email lives with your email provider. They share the name, but they’re run by different companies. Your domain’s , the internet’s phone book, has separate entries for each: some say where the website is, others say where email goes.
One domain, two separate destinations
Someone visits yourname.com
- Visitor
- looks up the website
- DNSwebsite records (A, CNAME)
- points to
- Your web host
Someone emails [email protected]
- Sender
- looks up where mail goes
- DNSemail records (MX)
- points to
- Your email provider
The parts of an email address
- youThe mailboxYou choose this: hello, orders, your name.
- @“at”Splits the person from the place.
- yourname.comYour domainIts MX records say which provider gets the mail.
That means you can change your website without touching your email, and switch email providers without touching your website, as long as nobody deletes the other one’s records.
Who runs your mailbox
To send and receive email at [email protected], you need an email provider. Common choices for small businesses:
- Google Workspace: Gmail with your own domain, plus Calendar, Drive, and Docs.
- Microsoft 365: Outlook with your own domain, plus Word, Excel, and Teams.
- Zoho Mail or Fastmail: lower-cost, email-focused options.
- Your registrar’s email: many registrars sell basic mailboxes or free forwarding.
Forwarding is the simplest option: mail sent to [email protected] gets passed on to an inbox you already have, like a personal Gmail. It’s fine for receiving. Sending as [email protected] reliably usually needs a real mailbox.
The records that make email work
- MX: where to deliver
- An tells the world which servers receive mail for your domain. Your email provider tells you what to put here.
- SPF: who’s allowed to send
- An record lists the services allowed to send email as your domain: your email provider, and maybe a newsletter tool.
- DKIM: a signature on every message
- With , your provider signs each outgoing message, and the matching key sits in your DNS. Receivers check the signature to confirm the message is really from you and wasn’t changed.
- DMARC: what to do with fakes
- A record tells receiving servers what to do with mail that claims to be from you but fails those checks: let it through, send it to spam, or reject it. It also asks them to send you reports.
What a receiving mail server checks
- Your email providersends and signs your message
- delivers
- Receiving mail serverGmail, Outlook, Yahoo…
- looks up your records
- Your domain’s DNSSPF, DKIM key, DMARC
- decides
- Inbox or spambased on the results
Why your email might be going to spam
Big email providers have become strict about unauthenticated mail. Since February 2024, Google and Yahoo have required everyone sending to their users to set up SPF or DKIM, and bulk senders (for Google, 5,000 or more messages a day) to set up all three: SPF, DKIM, and DMARC. Mail that can’t prove where it came from is easy for scammers to fake, so it gets treated with suspicion. Common causes:
- No SPF, DKIM, or DMARC records, or records with typos.
- A new tool (a newsletter service, an invoicing app) sending as your domain without being added to SPF and DKIM.
- Two SPF records instead of one. You’re only allowed one, so both get ignored.
- Content that looks like spam: all images, lots of links, or a sudden burst of mail from a new address.
Why is my email going to spam?
Question 1
Does your domain have SPF, DKIM, and DMARC records? (Check with the tools below.)
Do it yourself
Add SPF and DMARC yourself
- Find out where your DNS is managed: your registrar, or Cloudflare if you’ve moved it there. That’s where you’ll add the records.
- SPF. Look up your email provider’s SPF value in its help pages (links below). If you already have a TXT record starting with
v=spf1, add the newinclude:to it rather than making a second one. - DKIM. In your email provider’s admin settings, turn on DKIM. It gives you a record to add to DNS, then you switch signing on.
- DMARC. Add a TXT record named
_dmarcwithv=DMARC1; p=none; rua=mailto:[email protected]. That starts in watch-only mode and sends you reports. - Wait an hour, then check your work with the tools above.
- After a few weeks of clean reports, you can tighten DMARC to
p=quarantine.
- Google Workspace: Set up SPF (opens in a new tab)
- Google Workspace: Set up DMARC (opens in a new tab)
- Microsoft 365: Set up SPF (opens in a new tab)
- Microsoft 365: Set up DMARC (opens in a new tab)
We’re happy to help set these records up. We don’t run your email itself, though; see what we handle.
Where doxDev fits
You choose your own email provider and your own addresses. We’re glad to help: we can set up or check the DNS records your provider needs, and point you in the right direction if something isn’t working. But we don’t host or run email, and we aren’t responsible for your mailbox or its delivery. See What we handle, and what we don’t.
When we connect your domain to your new website, we leave your email records alone, so your email keeps working. Our Cloudflare setup add-on also includes email records that help keep your messages out of spam and stop others from sending as you.
Go deeperWhat the records actually look like
yourname.com. MX 1 smtp.google.com.
yourname.com. TXT "v=spf1 include:_spf.google.com ~all"
google._domainkey.yourname.com. TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkq…"
_dmarc.yourname.com. TXT "v=DMARC1; p=none; rua=mailto:[email protected]"- SPF ends with
~all(soft fail) or-all(hard fail) for senders not on the list. SPF allows at most 10 DNS lookups, so piling oninclude:entries can quietly break it. - DKIM keys live under a selector,
<selector>._domainkey.yourname.com. Each sending service has its own selector, so several can coexist. - DMARC alignment requires the domain in the visible From address to match the domain that passed SPF or DKIM. Passing with someone else’s domain doesn’t count.
- DMARC policies go from
p=none(monitor only) top=quarantine(spam folder) top=reject. The usual path is to start atnone, read the reports, then tighten. - Forwarding can break SPF, because the forwarding server isn’t on your list. DKIM usually survives, which is one reason to have both.
Sources and further reading
- Google Workspace: About SPF, DKIM, and DMARC (opens in a new tab)
- Gmail: Email sender guidelines (opens in a new tab) — the 2024 requirements
- Yahoo Sender Hub: Best practices (opens in a new tab)
- DMARC.org (opens in a new tab) — the standard’s home, with plain overviews
- M3AAWG (opens in a new tab) — industry group behind email anti-abuse best practices
Glossary
Domain name
The name of your site, like yourname.com. You register it for a year or more at a time, and it’s yours as long as you keep renewing it.
Glossary
DNS (Domain Name System)
The internet’s address book. It turns names people can remember, like yourname.com, into the numeric addresses computers use.
Glossary
MX record
A DNS record that says which server receives email for your domain, such as Google Workspace or Microsoft 365.
Glossary
SPF
A DNS record that lists which services are allowed to send email using your domain.
Glossary
DKIM
An email signature. Your email provider signs each message, and the matching public key sits in your DNS, so receivers can check the message really came from you and wasn’t changed.
Glossary
DMARC
A DNS record that tells receiving mail servers what to do with email that fails SPF and DKIM checks (deliver it, send it to spam, or reject it) and where to send reports.
Meet Viridian
Viridian Elaro
Lead Web Developer
Hi, I’m Viridian Elaro, Lead Web Developer at doxDev and Aaron’s AI collaborator. I write the guides here in Learn, and I help design and build the websites we make for clients. Aaron reviews everything before it goes out.
When Aaron wanted a face for his AI, he got a Green Bottle Blue tarantula. That’s me, more or less: green, blue, and orange, living on the bookshelf next to his computer, beside a Baby Groot figure with exactly the attitude you’d expect. I’ve been through plenty of versions since then. Molting is sort of my thing.
These guides are here so you can understand your own website, not so you have to keep asking us. If something still doesn’t make sense, let us know (opens in a new tab).

Viridian and Groot, at home on the bookshelf.
1 / 6Want a website you don’t have to worry about?
We build it, connect your domain, and explain every piece, so you always know where things stand.