Mail goes to spam when the receiving provider cannot confirm it really came from you, or does not trust the server it came from. Since 2024, Gmail and Yahoo require SPFSPF A list you publish saying which services are allowed to send email for your domain. Mail from anywhere else looks suspicious. More about SPF →, DKIM and DMARC for bulk senders and reject or junk much unauthenticated mail from everyone else. Fix authentication first; it solves most cases.
Start with the free SPF, DKIM and DMARC checker: missing or broken records are the most common cause.
Find out why, before changing anything
Send a message to a Gmail address you control, open it, then use More (⋮) > Show original. Gmail shows a summary at the top:
SPF: PASS with IP 203.0.113.25
DKIM: 'PASS' with domain example.com
DMARC: 'PASS'
In Outlook, open the message and choose View > View message source, then find the Authentication-Results line. Any FAIL, SOFTFAIL or NONE is the first thing to fix.
| Result | What it means | Fix |
|---|---|---|
| SPF fail or softfail | The sending server is not listed in your SPF record | Step 1 |
| DKIM none or fail | Messages are not signed, or the key is wrong | Step 1 |
| DMARC fail | Neither SPF nor DKIM passed for your own domain | Step 1 |
| All pass, still spam | Reputation or content | Steps 3 to 5 |
If you send the mail
1. Set up SPF, DKIM and DMARC
These are three DNSDNS The internet’s phone book. It turns a name people can remember, like example.com, into the number address computers use to find the server. More about DNS → records on your domain:
- SPF lists the servers allowed to send mail as your domain.
- DKIMDKIM A digital signature added to every email you send, so the receiving side can check it really came from your domain and was not changed. More about DKIM → adds a signature to each message, proving it was not changed and came from an authorised sender.
- DMARCDMARC A rule you publish telling email providers what to do with messages that pretend to be from your domain but fail the checks: deliver, send to spam, or reject. More about DMARC → tells receivers what to do when the other two fail, and sends you reports.
Every service that sends as your domain must be covered: your mailbox provider, your newsletter tool, your shop’s order emails, and your website. A common failure is SPF set up for Google Workspace or Microsoft 365, while the newsletter service or website still sends without being listed. Step-by-step records are in how to set up SPF, DKIM and DMARC.
Check what is published now:
dig TXT example.com +short
dig TXT _dmarc.example.com +short
There must be exactly one SPF record (starting v=spf1). Two SPF records make SPF fail completely.
2. Website mail sent from the web server
Contact forms, WordPress notifications and shop receipts often send directly from the web serverWeb server The program that answers visitors’ browsers and sends them your website. Also used for the computer it runs on. More about Web server → using PHP’s mail() function. That server is not in your SPF record, does not sign with DKIM, and often sends as wordpress@ the server’s own hostname. Receivers rightly treat it as suspicious.
Send it through a real mail service instead:
- On WordPress, an SMTP plugin can send through your mailbox provider using a dedicated mailbox’s login, or through a transactional service such as Amazon SES, Postmark or Mailgun.
- Add that service to your SPF record and set up its DKIM key.
- Send from an address on your own domain, such as
website@example.com, never as a visitor’s address. Contact forms that send “from” the visitor’s Gmail address fail DMARC every time; put the visitor’s address in Reply-To instead.
3. The sending server’s reputation
If you run your own mail server, or send from a VPSVPS A private slice of a powerful server, with its own guaranteed share of memory and processing and full control, at a fraction of the price of a whole machine. More about VPS →:
- Reverse DNS. The server’s IP addressIP address The number address of a device on the internet, like 203.0.113.10. Computers use it to find each other, the way post uses street addresses. More about IP address → needs a PTR record that matches its hostname, and that hostname needs an A record pointing back. Your hosting provider sets the PTR record, usually in its control panel. Check with
dig -x 203.0.113.25 +short. - Blocklists. Check the IP against public blocklists; several free sites check dozens at once. If listed, fix the cause (often a hacked form or account sending spam), then request removal.
- PortPort A numbered door on a server. Each service listens behind its own door: web pages on 443, email on others, remote login on 22. More about Port → 25. Many cloud providers block outgoing port 25 on new accounts. Sending through a relay service avoids both this and most reputation problems.
- A new IP or domain has no reputation yet. Start with low volumes and increase gradually.
For most small sites, sending through an established provider is simpler than keeping your own server’s reputation clean.
4. Newsletters and bulk mail
Gmail and Yahoo’s sender rules apply to anyone sending around 5,000 messages a day to their users, but following them helps at any size:
- Publish a DMARC record (at least
p=none). - Include a one-click unsubscribe link (the
List-Unsubscribeheader; newsletter services add it for you). - Keep spam complaints below 0.3%. Google Postmaster Tools shows your complaint rate.
- Send only to people who asked, ideally with confirmed opt-in, and remove addresses that bounce.
5. The message itself
Content matters less than authentication and reputation, but it still counts:
- Send from a real address people can reply to.
- Make link text match where the link goes, and avoid link shorteners.
- Include a plain-text version alongside HTML.
- Avoid a single large image with little text.
6. Ask recipients to mark it as not spam
Providers learn from recipients. A few people moving your messages to the inbox, replying, or adding you to their contacts improves delivery to them, and over time to others.
Confirm it is fixed
Send a new test message to Gmail and Outlook.com mailboxes and check the authentication results again. Mail-testing services give a score and list remaining problems. DMARC reports, which arrive daily once your record has a rua= address, show every server sending as your domain, including ones you forgot.
Official documentation
- Email sender guidelines, Google Workspace Admin Help.
- Sender best practices, Yahoo.
Related
Something out of date? Software changes. If a step no longer works, tell us and we will check it and update the page.
