Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

Email going to spam? How to set up SPF, DKIM and DMARC

Most mail that lands in spam fails a check the receiver runs before reading a word: does this domain say this server may send for it? This guide explains the common causes, gives example SPF, DKIM and DMARC records, summarises Gmail's and Outlook's sender rules, and shows how to test.

Short answer: Email usually lands in spam because the receiver cannot verify it came from your domain. Publish one SPF record listing every service that sends for you, turn on DKIM signing with your own domain, and add a DMARC record starting at p=none. Then check the headers show SPF, DKIM and DMARC pass.

When mail from your domain lands in spam, the receiving provider has decided it cannot trust where the message came from, or does not trust the sender's history. The first part is fixable in DNS in under an hour: publish SPF, turn on DKIM signing and add a DMARC record. Gmail and Outlook now require these for anyone sending in volume, and they help every sender. This guide explains the causes, gives example records you can adapt, and shows how to check the result.

Why your email goes to spam: the usual causes

Common reasons mail lands in spam, and where to look
CauseHow to spot itFix
No SPF record, or one that leaves out a senderHeaders show spf=none, softfail or failPublish one SPF record listing every service that sends for you
Mail is not DKIM-signed with your domaindkim=none, or signed only by the provider's own domainTurn on DKIM in your mail service and publish its key
No DMARC recorddmarc=none, or a "no DMARC" warning in testersAdd a DMARC record, starting at p=none
SPF or DKIM pass, but for a different domain than the From addressdmarc=fail although SPF or DKIM shows passUse a custom DKIM domain or a custom bounce domain so they align
Website sends with PHP mail() from the web serverReceived headers show your web server's IP and no DKIMSend through a mail service on port 587 with authentication
Server IP has no reverse DNS (PTR) or is on a blocklistBounces mention PTR, rDNS or a blocklist nameSet PTR, or relay through a mail service instead
Recipients mark your mail as spamHigh spam rate in Google Postmaster ToolsMail only people who asked, add one-click unsubscribe

The first four rows are DNS. The rest are about how and to whom you send. Fix the DNS first, because everything else is judged after it.

Step 1: list everything that sends mail as your domain

Before writing records, make a list. Typical senders are your mailbox provider, your website or app (contact forms, password resets, invoices), a newsletter or marketing tool, a helpdesk, a billing system and sometimes a CRM. Each needs to be covered by SPF or DKIM, ideally both. Anything you forget will fail once DMARC is enforced, so the list matters more than the syntax.

Step 2: publish one SPF record

SPF (Sender Policy Framework, RFC 7208) is a TXT record on your domain listing which servers may send mail for it. Each sending service tells you what to include. A domain that uses one mail provider and one newsletter tool might publish:

example.com.  3600  IN  TXT  "v=spf1 include:_spf.mailprovider.example include:spf.newsletter.example ~all"

If you also send directly from your own server, add its address with ip4:203.0.113.10. Three rules catch most people out:

  • One SPF record only. RFC 7208 treats two v=spf1 records on the same name as a permanent error, so SPF fails for all mail. Merge them into one.
  • No more than 10 DNS lookups. Each include, a, mx, ptr, exists and redirect costs a lookup, and nested includes count too. Over 10 is also a permanent error. Remove services you no longer use.
  • End with ~all or -all, never +all, which lets anyone send as you. ~all (softfail) is the safe start; DMARC will decide what happens to failures.

SPF checks the envelope sender (the bounce address), not the From address people see. That is why DKIM and DMARC are needed as well.

Step 3: turn on DKIM signing

DKIM (DomainKeys Identified Mail, RFC 6376) adds a digital signature to each message. Your mail service signs with a private key and you publish the public key in DNS under a selector name it gives you:

s1._domainkey.example.com.  3600  IN  TXT  "v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA..."

Some services ask for a CNAME instead, pointing your selector at a key they host and rotate; publish exactly what they show. Use a 2048-bit key where the service offers it. Google's sender guidelines require a key of 1024 bits or longer for any mail to personal Gmail accounts and recommend 2048 bits. A long key may need to be split into several quoted strings in one TXT record; most DNS panels do this for you.

The important setting is that the signature uses your domain (d=example.com), not the service's. Many tools sign with their own domain until you add the records and switch on "custom domain" or "authenticate domain".

Step 4: add a DMARC record

DMARC ties the two together. It passes when SPF or DKIM passes and the domain that passed matches the From address, and it tells receivers what to do when neither does. It lives at _dmarc on your domain:

_dmarc.example.com.  3600  IN  TXT  "v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com"
  1. Start with p=none. Nothing is blocked; receivers send aggregate reports to the rua address showing which IPs sent as your domain and whether they passed.
  2. Read the reports for two to four weeks. Fix any real sender that fails, usually a tool missing from SPF or without DKIM on your domain.
  3. Move to p=quarantine, which asks receivers to put failing mail in spam.
  4. Then p=reject once you are confident, so forged mail claiming to be you is refused outright.

DMARC was revised in May 2026: RFC 9989 replaced RFC 7489 and dropped the old pct= tag, so do not rely on a percentage rollout; a t=y (testing) flag replaces part of what it did. The none, quarantine and reject policies are unchanged.

What Gmail and Outlook require from senders

Sender rules from Google and Microsoft (checked 1 December 2026)
ProviderApplies toAuthenticationOther rules
Gmail, all sendersAnyone sending to Gmail accountsSPF or DKIMValid forward and reverse DNS for sending IPs, TLS, spam rate in Postmaster Tools below 0.3%, DKIM key 1024 bits or longer
Gmail, bulk sendersAbout 5,000 or more messages a day to GmailSPF and DKIM, plus DMARC (p=none allowed) aligned with the From domainOne-click unsubscribe and a visible unsubscribe link on marketing mail
Outlook.com high-volume sendersDomains sending over 5,000 emails a daySPF, DKIM and DMARC of at least p=none, aligned with SPF or DKIMNon-compliant mail goes to Junk from May 2025; Microsoft says rejection (error 550 5.7.515) will follow on a date it will announce

If you send far less than this, the rules still describe what filters reward. A small business with all three records in place is in a better position than one relying on luck.

Test your setup

  1. Check the records exist. From any Linux or macOS terminal:
    dig example.com TXT +short
    dig s1._domainkey.example.com TXT +short
    dig _dmarc.example.com TXT +short
    On Windows, nslookup -type=TXT _dmarc.example.com does the same. New records can take time to appear everywhere; see DNS propagation time.
  2. Send yourself a test and read the headers. In Gmail, open the message, choose "Show original" and look for SPF, DKIM and DMARC each marked PASS. The Authentication-Results header shows the same in any mail client.
  3. Use a checker. Third-party tools such as MXToolbox and mail-tester score your records and a sample message. Treat their scores as hints; the receiving provider's own verdict in the headers is what counts.
  4. Watch reputation over time. Google Postmaster Tools shows your spam rate and authentication results for mail to Gmail once you verify the domain.

If you send from your own VPS

Most websites and apps should hand mail to a mail service on port 587 rather than deliver it themselves; our SMTP guide explains why, and email port numbers lists the ports. If you do run a mail server on a VPS, you need all three records above plus a PTR (reverse DNS) record for the server's IP that names a hostname resolving back to the same IP, and a new IP has no sending history, so start with low volumes. On our VPS and dedicated servers outbound port 25 is closed by default and opened on request; why port 25 is closed explains the process.

When everything passes but mail still goes to spam

  • Check the content. Link shorteners, image-only messages, a mismatch between link text and the real URL, and attachments from unknown senders all count against you.
  • Check who you mail. Bought or old lists produce bounces and spam complaints, which hurt more than any missing record.
  • Keep sending steady. A sudden jump from a few messages to thousands looks like a compromised account.
  • Ask recipients to mark you "Not spam" and to add you to their contacts; it helps that mailbox and feeds the provider's signals.

On Bigdomainhost servers

We do not sell standalone email hosting or an SMTP relay. If you need mailboxes on your website's domain, our Web and cPanel hosting plans include them, with SPF, DKIM and DMARC set up by default; otherwise keep using your current mail provider and publish the records it gives you. If your website or application runs on our VPS or dedicated servers, we will help you check SPF, DKIM, DMARC and PTR and read any bounce. Phone support is in IST working hours and WhatsApp is answered at any time on +91 75994 50220. For the DNS basics, see What is DNS?

This guide was written by the Bigdomainhost team with AI assistance. Record formats were checked against RFC 7208, RFC 6376 and RFC 9989, and sender rules against Google's and Microsoft's published guidance, on 1 December 2026.

Sources (checked )

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

Why are my emails going to spam?

Most often because the receiving provider cannot confirm the mail came from your domain: SPF is missing or incomplete, the mail is not DKIM-signed with your domain, or there is no DMARC record. Other causes are a sending IP without reverse DNS or on a blocklist, and recipients marking your mail as spam.

Can a domain have two SPF records?

No. RFC 7208 treats more than one v=spf1 record on the same name as a permanent error, so SPF fails for all your mail. Merge every sender into one record, and keep it within the limit of 10 DNS lookups.

What DMARC policy should I start with?

Start with p=none and a rua address for reports. Read the reports for a few weeks, fix any genuine sender that fails, then move to p=quarantine and finally p=reject. Since RFC 9989 (May 2026) the pct tag is no longer part of DMARC; a t=y test flag replaces part of what it did.

Do Gmail and Outlook require SPF, DKIM and DMARC?

Gmail requires SPF or DKIM from all senders, and SPF, DKIM and DMARC from bulk senders of about 5,000 messages a day. Outlook.com requires SPF, DKIM and DMARC of at least p=none from domains sending over 5,000 emails a day, and sends non-compliant mail to Junk.

Does Bigdomainhost sell email hosting?

Not as a separate service: we do not sell standalone email hosting or an SMTP relay. Mailboxes on your website's domain are included with our Web and cPanel hosting plans, with SPF, DKIM and DMARC set up by default. Otherwise keep your current mail provider and publish the records it gives you; if your site runs on our servers, we will help you read bounces.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.