Skip to content
HARDEX

Guide

SPF, DKIM and DMARC for your app's email, in plain words

If your app sends email, such as sign-up links or receipts, three short records in your domain's settings tell the world which email really comes from you. Without them, anyone can send email that looks like it came from your address, and your own emails are more likely to land in spam.

This guide explains what each record does, how to add it and how to test it. You do not need to be a developer, but you do need access to your domain's settings.

1SPF: who may send for your domain

SPF is a record that lists the services allowed to send email for your domain. A receiver checks it, and treats email from anywhere else with suspicion.

Check it yourself: Look up your domain in a free SPF checker. You should find exactly one record that starts with v=spf1. Two records break each other, and a record that points at too many other services can stop working.

What to do: Add the record your email service tells you to add, and add each new service to your one existing record instead of making a second one.

2DKIM: a signature on every email

DKIM adds a signature to each email, so that the receiver can see it was not changed on the way and that your domain allowed it. Your email service makes the keys, and you publish the public half in your domain's settings.

Check it yourself: In your email service's dashboard, find the page for your domain and see whether its DKIM records are marked as verified. In a lookup tool, they sit at a name that contains _domainkey.

What to do: Copy the records the service shows you into your domain's settings exactly as written, then press its verify button. It can take a while to take effect.

3DMARC: what to do when a check fails

DMARC tells receivers what to do with email that fails SPF and DKIM, and where to send reports. The first setting, p=none, only watches. It is a good first step, but it does not stop anyone from faking your address.

Check it yourself: Look up _dmarc.yourdomain.com, with your own domain, in a lookup tool. You should find a record that starts with v=DMARC1.

What to do: Add a DMARC record that starts with p=none and has an address for reports. When your own email passes SPF and DKIM, move to p=quarantine and later p=reject, which tell receivers to treat failing email as spam or to refuse it.

4Send yourself a test

Records can look right and still not work, for example when your app sends from a different address than the one you set up.

Check it yourself: Send an email from your app to a mailbox you own. In Gmail, open the message, choose “Show original” and look for SPF, DKIM and DMARC. Each should say pass.

What to do: If one says fail or none, check that the address your app sends from is on the domain you set up, and that the service is added to your SPF record. Then test again.

What a check can and cannot tell you

Passing these checks does not prove an app is safe. It means these problems were not found. A full review also looks at how your app handles each person's data, and that takes someone who reads the code or tries to get past the sign-in.

Check them all from the outside

Hardex scans a live app the way a stranger on the internet would, with nothing to install. By default it only reads: it never changes anything in your app. It looks for the problems above where they apply to your app, and more, then reports what it found.

What each plan includes is on the plans page.

Scan your app