Blog · 16 November 2026 · 8 minute read
SPF, DKIM and DMARC explained for founders: why your emails land in spam
What the three email records do, in plain words, how to set them up for a new domain, and the mistakes that send sign-up emails to spam.
The problem they solve
Email was designed without any check on who is sending. Anyone can put your address in the From line. Mail providers such as Gmail and Outlook therefore treat mail from a domain they have not seen before with suspicion, and a new product's sign-up email is exactly that.
SPF, DKIM and DMARC are three DNS records that let your domain prove which mail is really yours. With them in place, your confirmation emails reach the inbox. Without them, a share of your new users never see the email and never come back.
SPF: which servers may send for you
SPF is a list. It is a TXT record on your domain that names the servers allowed to send mail on its behalf. When a message arrives, the receiving server checks whether it came from a server on the list.
A domain may have only one SPF record. If you use two services that both want one, their entries are merged into a single record. Two separate SPF records cancel each other out, which is one of the most common setup mistakes.
DKIM: a signature on every message
DKIM signs each message with a private key held by your email provider. The matching public key is published as a DNS record on your domain. The receiving server uses it to check that the message really came from your provider and was not changed on the way.
You do not create the keys yourself. Your provider gives you one or more records to add, usually under a name that includes the word domainkey. Copy them exactly: a single missing character makes the signature fail.
DMARC: what to do when a check fails
DMARC is a policy. It tells receiving servers what to do with mail that claims to be from your domain but fails SPF and DKIM: deliver it anyway, send it to spam, or reject it. It also lets you receive reports on who is sending mail in your name.
Start with a policy of none, which only monitors, and confirm your real mail passes. Then tighten it to quarantine or reject. Jumping straight to reject before your records are right can block your own email.
Setting it up for a new domain
- Add your domain at your email provider. It will list the DNS records it needs.
- Create each record in your DNS zone exactly as shown, including the name and the type.
- Wait until the provider shows the domain as verified. DNS changes can take minutes to spread.
- Send a test message to an address at Gmail and one at Outlook, and check it lands in the inbox.
- Only then let your app send to real users.
Mistakes that cause spam
- Sending from a free address instead of your own domain.
- Two SPF records on the same domain.
- Sending before the domain shows as verified.
- A From address on a different domain than the one you verified.
- A first email that is all images and links, with almost no text.
- Buying a list. Send only to people who signed up.
Sending and receiving are separate
These records cover mail you send. Receiving is a different setup, using MX records. A domain can send perfectly and still bounce every reply, because nothing was configured to receive. If your emails come from hello@yourdomain, make sure mail to that address goes somewhere, even if it only forwards to your personal inbox.
Doing it without the DNS work
The records are simple once you have seen them, but they are fiddly, and a mistake fails silently. During a launch, Shipyard adds your domain at the email provider, creates the SPF, DKIM and DMARC records in your DNS, waits for verification and then makes a sending-only key, so the first email your product sends is already trusted.
Launch in an hour, not a weekend
Shipyard connects your accounts once, then sets up the domain, hosting, database, email and payments for every new product.
See how it works