Guides

Why emails go to spam and how to fix it: SPF, DKIM and DMARC

A customer says they never received your quote, then later finds it in their spam folder. The most common cause isn't the email's content, but an incorrectly configured domain. In this guide we explain what to check, and how to fix it.

By PageVision · Updated

How the receiving server decides where to put an email

When an email arrives, Gmail, Outlook or another mail server first checks whether it really was sent from the domain shown in the sender's address. Three DNS records are used for this: SPF, DKIM and DMARC. If they're missing or incorrect, the email looks potentially forged, so it ends up in spam or gets rejected outright.

SPF: who is allowed to send on your behalf

An SPF record is a list of servers allowed to send email on behalf of your domain. It's added as a TXT record in your domain's DNS settings, for example:

v=spf1 mx include:_spf.google.com ~all

Your SPF record needs to include every source that sends email on your behalf: your mail server, your website (if its forms send email), your newsletter tool, your invoicing software. The most common mistakes are:

  • Two separate SPF records created for one domain – then neither is valid. There must be a single record listing every source.
  • Too many "include" entries: SPF allows no more than 10 DNS lookups, and going over that limit makes the check fail.
  • A newsletter or invoicing tool left out – its emails then fail the check.

DKIM: a digital signature for your emails

DKIM signs every outgoing email with a private key, while the matching public key is published in your domain's DNS. The recipient checks the signature to confirm the email wasn't altered in transit. The DKIM key is generated by your email provider (your own mail server, Google Workspace, Microsoft 365, or a newsletter tool), and you add it to your DNS. Every sending tool has its own DKIM key.

DMARC: what to do when a check fails

DMARC tells the recipient what to do with an email that fails SPF and DKIM checks, and where to send reports. A record looks like this:

v=DMARC1; p=none; rua=mailto:[email protected]
  • p=none – only monitor and receive reports. Worth starting here.
  • p=quarantine – send emails that fail the check to spam.
  • p=reject – reject such emails outright. The strongest protection against someone forging your domain.

Start with p=none, monitor the reports for a few weeks, confirm every legitimate sending source passes, and only then tighten the policy.

What Gmail and Outlook require

Since February 2024, Google has required anyone sending to Gmail addresses to have at least SPF or DKIM, and anyone sending more than 5,000 emails a day to have SPF, DKIM, DMARC, and a one-click unsubscribe link in newsletters. Since May 2025, Microsoft (Outlook.com, Hotmail) has applied similar requirements to high-volume senders. Even if you send relatively few emails, all three records help them reach recipients.

How to check in a few minutes

  1. Send an email from your company address to any Gmail address.
  2. In Gmail, open the email, click the three-dot menu, and choose "Show original".
  3. Near the top you'll see SPF, DKIM and DMARC lines. All three should say PASS.
  4. If any line says FAIL, or is missing, your DNS records need fixing.

Also check your website's contact form: if it sends email through the server's own PHP function rather than through your mailbox (SMTP), those emails often fail the check.

Other common causes

  • Your server's IP address ended up on a blacklist, for example because of spam sent by other users on the same server.
  • An email with just an image and lots of links, but very little text.
  • Newsletters sent to people who never asked for them, who then mark them as spam.
  • No reverse DNS (PTR) record configured for your sending server.

Frequently asked questions

Can’t find your answer? Ask us.

Is SPF alone enough?

For a small sender, Gmail might accept just SPF, but it's safest to have all three records: DKIM protects the content of the email, and DMARC protects your domain against being impersonated.

Can I set up SPF, DKIM and DMARC myself?

Yes, if you have access to your domain's DNS and know which records your email provider has given you. But a mistake in your DNS settings can disrupt your email, so if you're unsure, it's best left to a specialist.

How long do DNS changes take to apply?

Usually a few minutes to a few hours, depending on the record's time-to-live (TTL) setting. In rare cases, up to 24 hours.

Got a question?

Send it over — we'll reply with advice for your situation. No obligation either way.