Why emails go to spam and how to improve inbox placement
Domain authentication
-
SPF, DKIM, and DMARC
Basics- What's checked
- Who may send, a signature on the message, and the domain's policy
The three records let the receiving server confirm that the message really came from the domain and wasn't changed in transit. A message that fails authentication is marked as suspicious or rejected, even when its content is fine. The syntax, setup, and common problems are covered on a dedicated reference page.
-
From address alignment
- Example
- From: news@example.com with a DKIM signature of d=example.com
In DMARC, the domain in the From field, the address the recipient sees, must align with the domain that passed the SPF check or with the domain that signed with DKIM. An email marketing service or an external system that sends on behalf of your domain must sign with DKIM using your domain, or its messages fail DMARC.
-
Requirements for all senders
Gmail and YahooGoogle and Yahoo require every sender to have at least SPF or DKIM, valid forward and reverse DNS records for the sending address, including a PTR record, and a spam complaint rate below 0.3%. Google also requires a TLS connection and a message format that follows RFC 5322, and Yahoo requires compliance with RFC 5321 and RFC 5322.
-
Bulk senders
About 5,000 a day- Minimal DMARC record
- _dmarc.example.com TXT "v=DMARC1; p=none; rua=mailto:dmarc@example.com"
Google defines a bulk sender as one that sends about 5,000 messages a day to personal Gmail accounts, and the status stays even if the volume later drops. Such a sender needs both SPF and DKIM, a DMARC record (even with p=none), and an aligned From domain, plus one-click unsubscribe in marketing messages. Yahoo sets similar requirements and requires messages to pass DMARC.
-
Outlook.com requirements
Over 5,000 a day- Rejection code
- 550 5.7.515 Access denied, sending domain example.com does not meet the required authentication level
Microsoft requires domains that send more than 5,000 messages a day to Outlook.com services to pass SPF and DKIM and to publish a DMARC record of at least p=none, aligned with SPF or DKIM. Messages that don't meet the requirements go to the Junk folder or are rejected with the code 550 5.7.515. Microsoft also recommends a valid From or Reply-To address that accepts replies.
Sending infrastructure
-
PTR record (Reverse DNS)
Required- Check
- dig -x 192.0.2.25 +short
A PTR record returns a hostname for an IP address, which is DNS in reverse. Google and Yahoo require such a record for the sending address, and many mail servers filter or reject mail from an address without a PTR record. The record is set by whoever holds the address range, usually the server provider, not in the domain's DNS.
-
FCrDNS
Two-way match- PTR of 192.0.2.25
- mail.example.com
- A of mail.example.com
- 192.0.2.25
FCrDNS (Forward-confirmed reverse DNS) means a match in both directions: the name in the PTR record points, through an A record, back to the same IP address. Google requires the sending address to match the address of the hostname in the PTR record.
-
HELO / EHLO name
- Valid example
- EHLO mail.example.com
At the start of the conversation, the sending server introduces itself with the EHLO command. Under RFC 5321, this should be the fully qualified hostname (FQDN), and Spamhaus recommends a name that matches the DNS of the IP address and isn't a generic name like localhost.localdomain. A wrong name is a common reason for filtering.
-
TLS encryption when sending
Google requires a TLS connection for mail transfer, and the Encryption dashboard in Postmaster Tools shows what share of the messages was sent over an encrypted connection. Between mail servers, encryption starts with the STARTTLS command on port 25, so the sending server must support TLS and have a valid certificate.
-
Dedicated or shared IP address
On a shared address, several senders send from the same IP address, and how each of them behaves affects the shared reputation. On a dedicated address, the reputation is built only from your own mail. Google recommends making sure a shared address isn't listed on blocklists.
-
IP reputation and domain reputation
Mailbox providers rate both the sending IP address and the domain that appears in SPF and in the DKIM signature. The domain's reputation moves with it to a new server, so changing the IP address alone doesn't solve a problem of complaints or an unclean list.
-
Warming up a new address or domain
A new IP address or domain has no sending history yet. Google recommends starting with a small volume, to recipients who open and read the messages, and increasing the volume gradually over time. No single pace fits every sender, so at each stage keep track of complaints, bounces, and temporary rejections.
-
An IP address for each message type
Google recommends sending all messages from the same IP address, and if you need several addresses, assigning one to each message type, for example one for account messages and another for marketing. That way, complaints about marketing don't hurt the delivery of invoices and password reset messages.
-
Dynamic IP address
Addresses of home internet connections are usually on the Spamhaus PBL list, which marks addresses that aren't supposed to send mail directly to destination servers. From such an address, send through an outgoing mail server with authentication on port 465 or 587. According to Spamhaus, a mail server needs a static IP address with valid forward and reverse DNS records.
Mailing lists and content
-
Opt-in (prior consent)
Send marketing mail only to people who asked to receive it. Google recommends confirming every address before adding it to the list, and Yahoo recommends confirmed signup (Double opt-in), where the recipient clicks a link in a confirmation message, and forms without pre-checked consent boxes.
-
Purchased lists
Google and Yahoo advise against buying address lists. Such a list contains addresses that don't exist and recipients who never asked for the mail, so sending to it raises the bounce and complaint rates and hurts the reputation of the address and the domain.
-
One-click unsubscribe
RFC 8058- Header 1
- List-Unsubscribe: <https://example.com/unsubscribe/opaquepart>
- Header 2
- List-Unsubscribe-Post: List-Unsubscribe=One-Click
In marketing messages, Google and Yahoo require bulk senders to offer one-click unsubscribe. Google requires it to follow RFC 8058, and Yahoo recommends this method. Add a List-Unsubscribe header with an HTTPS URL and the List-Unsubscribe-Post header, both signed with DKIM. The email client sends a POST request to the URL, and the unsubscribe happens without a confirmation page. Google also requires a visible unsubscribe link in the message body.
-
Handling unsubscribe requests
Within 2 daysGoogle and Yahoo ask that every unsubscribe request be processed within 2 days at most. Transactional messages, such as password resets or order confirmations, are exempt from the one-click unsubscribe requirement.
-
Spam complaint rate
Below 0.3%- Recommended target
- Below 0.1%, per Google
The complaint rate is the percentage of messages that recipients marked as spam. Google and Yahoo require it to stay below 0.3%, and Google recommends keeping it below 0.1%. Yahoo calculates the rate out of the messages that reached the inbox, so your own calculation may come out different.
-
Hard bounces and soft bounces
A hard bounce is a permanent rejection with a 5xx code, for example an address that doesn't exist (550 5.1.1). A soft bounce is a temporary rejection with a 4xx code, for example a busy server. Remove invalid addresses from the list right away; Google recommends automatically removing recipients whose messages bounced several times.
-
Inactive recipients
Google recommends considering removing recipients who don't open the messages, and Yahoo recommends asking inactive recipients to confirm their subscription again from time to time. That way, the list stays smaller but active.
-
A consistent From address
Google recommends using the same From address for all messages of the same type, and requires a single address in the From field. Microsoft recommends a valid From or Reply-To address that accepts replies.
-
Message format
Google requires a format that follows RFC 5322, with a valid Message-ID and each of the From, To, Subject, and Date headers exactly once. The subject and sender name must reflect the content, so don't add Re: or Fwd: to a message that isn't a reply or a forward.
-
A steady frequency
Send at the frequency recipients signed up for: Yahoo advises against moving weekly or monthly subscribers to daily mailings. Google recommends sending at a steady pace, not in large bursts.
Blocklists (RBL)
-
What a blocklist (RBL) is
A blocklist, also called a DNSBL, is a database of IP addresses or domains with a poor reputation, which mail servers check when they receive a message. An address listed on a widely used list may be blocked by every server that uses it, and the rejection message usually names the list.
-
Checking the lists
- Spamhaus
- check.spamhaus.org
Check your status on Spamhaus with their Reputation Checker, for an IP address and for a domain. When a message is rejected, read the rejection message first, because it usually names the list that blocked it. IP address reputation data is also shown in Microsoft SNDS.
-
The Spamhaus lists
Spamhaus has several lists: SBL for malicious network ranges, XBL for addresses of compromised devices, CSS for addresses that send spam, PBL for addresses that aren't supposed to send mail directly, and DBL for domains with a poor reputation. A PBL listing isn't a spam listing; it marks addresses that aren't meant for a mail server.
-
Fix the cause first
Before delistingSpamhaus makes it clear that the cause of a CSS listing must be found and fixed before you request removal, and that if the problem continues, the address is listed again right away. Start by checking the settings: PTR, the EHLO name, and domain authentication. Once the settings are correct, look for a compromised mailbox, website, or server.
-
Removal from a list (Delisting)
On Spamhaus, check the address in the Reputation Checker, open the listing details, and follow the removal steps shown there. The number of self-service removals is limited, and a CSS listing usually expires about three days after the last detection. On other lists, follow the instructions on each list's website.
-
A compromised mailbox
A leaked password makes it possible to send spam from a legitimate mailbox, and the server's address ends up on blocklists. The signs: a large mail queue, bounce messages for messages you never sent, and a spike in sending volume in the logs. Change the mailbox password from a computer that was scanned and found free of malware, and turn on two-factor authentication wherever possible.
-
Open relay server
An Open relay server passes mail from any sender to any recipient without authentication, so it can be used to send spam. A mail server should accept on port 25 only mail for its own domains, and relay only messages from authenticated users. A properly configured server answers such an attempt with a rejection like Relay access denied.
-
Website forms and plugins
An unprotected contact form, or an outdated plugin in the content management system, can be used to send spam through the website. Spamhaus lists compromised websites and content management systems among the reasons for a CSS listing. Update the system and its plugins, add bot protection to forms, and check the mail logs to see which script sent the messages.
Diagnosis and checks
-
Reading the message headers
- Example
- spf=pass smtp.mailfrom=example.com; dkim=pass header.d=example.com; dmarc=pass
The Authentication-Results header shows the SPF, DKIM, and DMARC results as the receiving server saw them, and the Received headers show the path the message took. Send a test message to a mailbox at another provider, copy the full headers, and check them.
-
550 5.7.1
PermanentA permanent rejection for policy reasons: the receiving server refuses to accept the message. The rest of the line usually gives the reason, such as a blocklist listing, an SPF or DMARC failure, or content flagged as spam. Fix the cause, and only then send again.
-
421
TemporaryThe receiving server closes the connection temporarily, for example because of load or a high sending rate from one address. The sending server will try again later. When the code keeps coming back from the same provider over time, slow down your sending rate to it and check the reputation of the address.
-
451 and Greylisting
TemporaryGreylisting is a method where the receiving server temporarily rejects a message from a sender it doesn't know, and accepts it on the next attempt. A properly configured mail server tries again and delivers the message after a short delay, so no action is needed. A message that still isn't delivered after repeated attempts points to a problem on the sending server.
-
554
PermanentA permanent rejection. When the code arrives as soon as the connection opens, the receiving server refuses the whole conversation because of the sending address, for example because of a poor reputation or a blocklist listing. When it arrives after the message was sent, the explanation appears in the rest of the line.
-
Bounce message
- Example
- Diagnostic-Code: smtp; 550 5.1.1 User unknown
When a message isn't delivered, the sender gets a bounce message, usually from the MAILER-DAEMON address. Under RFC 3464, it has a structured part with the Action field (for example failed or delayed), the Status field with the enhanced code, and the Diagnostic-Code field with the original response of the receiving server, which is where to look first for the reason for the rejection.
-
Google Postmaster Tools
- Domain verification
- A TXT or CNAME record in the domain's DNS
A Google tool for senders to personal Gmail accounts. You verify the domain in it with a TXT or CNAME record, and see the compliance status, the spam complaint rate, the authentication results, the encryption rate, and delivery errors. When the daily volume is small, some of the data may not be shown.
-
Microsoft SNDS and JMRP
SNDS (Smart Network Data Services) shows whoever is responsible for IP addresses data about their reputation on Outlook.com. Sign in with a Microsoft account, request access to the addresses, and complete the ownership verification. With the JMRP program on the same site, you get a report when recipients mark one of your messages as junk.
-
Mail server logs
The mail server log shows, for each message, the response of the receiving server, with the full code and text. Search by recipient address or by message ID, and check the mail queue too: many messages waiting for the same provider point to blocking or rate limiting on its side.
No matching topics.
What to check when messages go to spam
- Authentication: send a test message to a mailbox at another provider, and check in its headers that SPF, DKIM, and DMARC passed and that the domain in the From field aligns.
- Infrastructure: check that the sending address has a PTR record, that the name in it points back to the same address, and that the server presents the same name in the EHLO command.
- Reputation: check the address and the domain on the blocklists, and the data in Postmaster Tools and SNDS.
- Mailing list: check the complaint and bounce rates, remove invalid addresses, and make sure one-click unsubscribe works.
- Gradual return: after the fix, resume sending at a small volume to active recipients, and increase the volume gradually.
Rejection codes are explained in detail on the SMTP error codes page, and the mail records, such as MX, TXT, and PTR, on the DNS record types page. The ports for mail transfer and for sending from email clients are covered on the port 25, port 465, and port 587 pages. The addresses and domains on this page are examples; replace them with your real values.
With our business email service, mailboxes run on dedicated mail servers, and the SPF record and DKIM signing are set up automatically for your business domain. For sending to large lists, our email marketing servers are a good fit: each server has its own IP address, so the reputation of the sending address isn't affected by other customers' mailings, and recipients can unsubscribe from the list with one click.
Email deliverability FAQ
Why do emails from my domain go to spam?
The common reasons are missing or incorrect domain authentication with SPF, DKIM, and DMARC, a sending address without a valid PTR record, a poor reputation of the address or the domain, and a high complaint rate. Start with a test message to a mailbox at another provider and read the authentication results in its headers, then check the infrastructure and the blocklists in the order shown on this page.
What is a PTR record, and who sets it up?
A PTR record returns a hostname for an IP address, and the large mailbox providers require one for every address that sends mail. The record is set by whoever holds the IP address, usually the server provider, not in the domain's DNS settings. On our Linux VPS, we set up a PTR record for the server's address on request.
How do I warm up a new IP address before a large mailing?
Start with a small number of messages to recipients who open and read your mail, and increase the volume gradually over time, at a steady pace and without bursts. No single pace fits every sender, so at each stage check the complaint rate, the bounces, and the data in Postmaster Tools before you increase the volume.
What's the difference between a dedicated and a shared IP address for bulk email?
On a shared address, several senders send from the same address, and its reputation depends on all of them. On a dedicated address, the reputation is built only from your own mailings, and you control it. On our email marketing servers, each server has its own IP address, so other customers' mailings don't affect the reputation of your sending address.
How do I check whether my sending address is on a blocklist?
First, read the rejection message, because it usually names the list. Check your status on Spamhaus with the Reputation Checker on their website, for both the IP address and the domain. If the address is listed, fix the cause first, and only then request removal according to the list's instructions.