Why Your Emails Land in Spam and How to Fix It
Your emails go to spam because the receiving mail server has decided, before it ever looks at your content, that your domain or your sending IP is not trustworthy enough to place in the inbox. The decision is made by a stack of authentication checks and reputation signals, and if any one of them fails, your message is routed to the spam folder. The good news is that most of these failures are fixable with specific DNS records, configuration changes, and a bit of patience.
Why do my emails go to spam: the authentication stack
The first thing a receiving server does is verify that you are who you claim to be. It checks three records on your domain: SPF, DKIM, and DMARC. If any of these are missing or misconfigured, your mail gets a demerit. SPF (Sender Policy Framework) is a DNS TXT record that lists the IP addresses allowed to send mail for your domain. DKIM (DomainKeys Identified Mail) is a cryptographic signature added to each message, and the public key lives in a TXT record on a subdomain like default._domainkey. DMARC (Domain-based Message Authentication, Reporting, and Conformance) tells the receiver what to do if SPF or DKIM fail, and it also requires that the domain in the From header aligns with the domain used in SPF and DKIM.
Start by checking what you currently have. Use dig to pull your SPF and DMARC records, and use a tool like opendkim to test your DKIM signature. Here is a quick command to see your SPF record:
dig TXT example.com +short
"v=spf1 include:_spf.example.com ~all"
If you see ~all or -all at the end, that is correct. If you see +all or nothing, that is a problem. For DKIM, you need to locate the selector your mail server uses. It is usually in your mail server config, and the record will look like this:
dig TXT default._domainkey.example.com +short
"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC..."
If the p= value is empty or the record does not exist, your DKIM is broken. For DMARC, run dig TXT _dmarc.example.com +short. A valid record looks like v=DMARC1; p=none; rua=mailto:[email protected]. Start with p=none to monitor, then move to p=quarantine once you see your authentication pass consistently.
Reputation and the sending IP
Even with perfect authentication, your IP address carries a history. If you share a server with spammers, or if your IP was previously used for bulk mail, the reputation is already low. Receiving servers use real-time blocklists and feedback loops to score your IP. A single spam report from a recipient can drop your score, and a burst of bounces to invalid addresses will do the same.
Check your IP against common blocklists. You can use a service like mxtoolbox or query the blocklist DNS zones directly. For example, to check against the Spamhaus ZEN list, run:
dig +short 2.0.0.127.zen.spamhaus.org
127.0.0.2
The output 127.0.0.2 means you are listed. If you are listed, you need to find out why. Look at your mail logs for patterns: are you sending to old addresses that bounce? Is your web form being abused to send mail to arbitrary addresses? Fix the source of the abuse, then request delisting from the blocklist operator. This can take days, so do not expect an instant fix.
Content and header signals
Authentication and IP reputation get you past the front door, but the spam filter still reads your message. It looks at the From header, the Subject, the Message-ID, and the body. A mismatched From domain, a missing Message-ID, or a Date header that is more than a few hours old will all add to the spam score. So will excessive use of words like "free", "urgent", or "guarantee", but those alone rarely cause a spam placement. The bigger issue is when your message looks like it was sent by a script, not a person.
Make sure your mail server sets a proper Message-ID and a Date header. If you are using Postfix, ensure always_add_missing_headers = yes in main.cf. If you are sending via a third-party API, check their documentation for how to set these headers. Also, do not use a From address that is a subdomain of your main domain unless you have SPF and DKIM for that subdomain. Receivers treat [email protected] as a different domain than [email protected].
Warm up and send volume
If you are new to a domain or an IP, do not send a thousand emails on day one. Receiving servers see a sudden spike from an unknown sender as suspicious. Start with a small volume, a few dozen a day, and increase gradually over a week or two. This is called warming up. During this period, send only to your most engaged recipients, the ones who open and click. Their positive signals build your reputation. Sending to a purchased list or to addresses that have not interacted with you in months will tank your score quickly.
Also, respect the List-Unsubscribe header. If you send bulk mail, include it. Receivers and spam filters look for an easy way out, and if they do not find one, they assume you are a spammer. Many filters will automatically move mail with a List-Unsubscribe header to the inbox if the rest of the signals are clean.
Check your logs and iterate
After you make changes, you need to see the effect. Your mail server logs will show you the delivery status codes. A 250 means accepted, a 550 means rejected, and a 421 means temporarily deferred. If you see a lot of 421 responses, that is the receiver throttling you, likely due to reputation. Look at the response text after the code, it often says "blocked by policy" or "see https://..." which tells you exactly which check failed.
You also need to set up DMARC reporting. The rua address in your DMARC record receives aggregate XML reports from receivers. Parse those reports with a tool like parsedmarc to see which of your sending sources pass and which fail. This is the most direct way to see if your SPF or DKIM is misaligned for a specific mail stream.
Why do my emails go to spam: the fix is a checklist, not a mystery
The answer to the question "why do my emails go to spam" is almost always one of three things: missing or broken authentication, a poor sending IP reputation, or a content and header problem. Go through the checklist in order. Fix SPF, DKIM, and DMARC first. Then check your IP against blocklists. Then correct your headers and warm up your sending pattern. Each step is verifiable with a command and a log line, so you are not guessing.
What to do next: run the dig commands above today, and fix whatever is missing. Then set up DMARC reporting and wait at least a week before making any judgment. If you still see spam placement after that, look at your bounce rate and your recipient engagement. The fix is rarely a single change, it is a sequence of small corrections that compound over time. Be methodical, keep your logs, and do not expect overnight results.
