A customer tells you your quote never arrived. A few days later they find it in their spam folder.
Most of the time the cause is the domain rather than the email itself. The receiving server cannot confirm that the message really comes from your company, so it plays safe and files it as spam.
How a receiving server decides
Before Gmail, Outlook, or any other provider trusts a message from your domain, it looks up three records in your domain's DNS: SPF, DKIM, and DMARC. Since February 2024, Gmail and Yahoo require every sender to pass SPF or DKIM, and senders of large volumes must publish DMARC as well. A domain without these records starts at a disadvantage.
| Record | What it tells the receiver | Without it |
|---|---|---|
| SPF | Which servers are allowed to send email for your domain | Any server can claim to be you, so the receiver cannot fully trust any of them |
| DKIM | A signature on each message, checked against a public key in your DNS | The receiver cannot tell whether the message was forged or changed on the way |
| DMARC | What to do when SPF and DKIM fail, and where to send reports | Each receiver decides on its own, and you never see who is sending as you |
Check your own domain
You can see the result for your domain in a few steps:
- Send an email from your company address to a personal Gmail account.
- Open the message in Gmail, click the three dots next to the reply button, and choose Show original.
- Read the lines for SPF, DKIM, and DMARC. Each one says PASS, FAIL, or is missing.
PASS on all three is what you want. Anything else is worth fixing. A free DNS checker such as MXToolbox shows the records themselves if you want to see what is published.
Fix it in this order
1. List everything that sends email as your domain
The email platform is the obvious one. Also count the website contact form, the invoicing or accounting app, the newsletter tool, and the office printer that scans to email. Each of them has to be covered by the records below, or its mail will start failing once DMARC is strict.
2. Publish one SPF record
SPF is a single TXT record on the domain that lists the allowed senders. For Google Workspace it contains include:_spf.google.com. For Microsoft 365 it contains include:spf.protection.outlook.com. Every other sender from step 1 gives you its own include to add.
Two rules catch most people out:
- One SPF record per domain. A second SPF record does not add to the first. It breaks both.
- No more than 10 DNS lookups in total. Each
includecounts, so a long list of tools can push the record past the limit, and then it fails.
3. Turn on DKIM
Google Workspace and Microsoft 365 both generate the DKIM key in their admin console. You publish it in DNS (a TXT record for Google, two CNAME records for Microsoft 365) and then switch signing on in the console. The record on its own does nothing until signing is switched on, which is the step most often missed.
Other tools that send as your domain, such as a newsletter service, usually offer their own DKIM key. Add those too.
4. Add DMARC, starting in monitoring mode
DMARC is a TXT record at _dmarc.yourdomain.com. Start with a policy that changes nothing for delivery and only asks for reports:
v=DMARC1; p=none; rua=mailto:[email protected]
The reports show every server sending email with your domain name, including the ones you forgot in step 1. Once all of your real senders pass, move the policy to p=quarantine, and later to p=reject. At that point receivers refuse mail that pretends to come from you, which also protects your customers from fake invoices sent in your name.
When the records pass and mail still lands in spam
Authentication is the most common cause, but not the only one. If all three records pass, look at these next:
- A compromised account. If an employee's account was taken over and used to send spam, the domain's reputation drops. Secure the account, turn on multi-factor sign-in for everyone, and check whether your domain appears on a public blocklist.
- Marketing and daily email on the same domain. Bulk newsletters affect the reputation of everything sent from that domain. Sending them from a subdomain such as
news.yourdomain.comkeeps them separate. - Old shared hosting. On shared email hosting, your mail leaves from a server used by many other customers, and their behavior affects where your mail lands.
Summary
Email from a company domain usually lands in spam because the domain cannot prove the mail is genuine. Publishing SPF, DKIM, and DMARC, in that order and with every sender included, fixes most cases and stops others from sending email in your name.
This is one of the problems on our Problems we solve page. We set up SPF, DKIM, and DMARC as part of a Google Workspace, Microsoft 365, or Lark implementation.
Share article
Written by
JasaKonfig Team
The JasaKonfig team handles implementation, migration, and storage for companies in Indonesia. Questions? [email protected]