Contents of this article
Together, three DNS records determine whether recipients trust your email. This page explains what each record does, what such a record looks like, the order in which to turn them on, and which mistakes are most common. It applies with any provider, not just with us.
What each record does
Email was originally designed without any sender check: any server on the internet can send a message with your domain as the sender. SPF, DKIM and DMARC are the three layers added on top of that afterwards. All three live in your domain's DNS, not in your mail program.
SPF: which servers may send mail on your behalf
SPF is a list of servers allowed to send mail with your domain as the sender. A receiving mail server looks at the IP address the message comes from and compares it with your list. If the sender isn't on it, the recipient knows something is wrong.
DKIM: a signature on the message itself
With DKIM, your mail server adds a cryptographic signature to the header of every outgoing message. You publish the matching public key in DNS. The recipient can use it to check that the message wasn't altered in transit and that it really was sent by a server holding your key. Unlike SPF, DKIM stays valid when a message is forwarded.
DMARC: what should happen when it doesn't check out
DMARC ties the previous two together and tells the recipient what to do with mail that fails the check: nothing, put it in the spam folder, or reject it. DMARC also lets you request reports, so you can see who is sending mail on behalf of your domain. Without SPF and DKIM, DMARC means nothing.
What such a record looks like
All three are TXT records. The values below are examples: you get the exact content from the party that sends your mail.
SPF
On your domain name itself, so without a subdomain:
v=spf1 include:_spf.voorbeeld.nl -allEach include: adds the servers of one party. If you also send mail through a newsletter service or an accounting package, add it to the same record. -all means: everything else isn't mine. If you want to start cautiously, use ~all and tighten it later.
DKIM
On a selector your mail provider determines, for example default._domainkey.voorbeeld.nl:
v=DKIM1; k=rsa; p=MIIBIjANBgkqhkiG9w0BAQ…DMARC
Always on _dmarc.voorbeeld.nl:
v=DMARC1; p=none; rua=mailto:dmarc@voorbeeld.nlThe order
The order isn't optional. Making DMARC strict before SPF and DKIM are correct is the quickest way to get your own mail rejected.
- First take stock of everything that sends mail on behalf of your domain: your mail server, the website, the newsletter, the accounting package, the point-of-sale system.
- Set up SPF with all of those parties in it, in one record.
- Publish DKIM and check in a sent message that the signature is valid.
- Set DMARC to
p=nonewith a reporting address. - Read the reports for a few weeks, add whatever you forgot, and then set
p=quarantineand, if you like,p=reject.
The most common mistakes
Two SPF records
This almost always happens when a service was added later and a second record was placed next to the existing one. Two SPF records are invalid: recipients then see no valid policy at all, not even the record that was correct. Merge them into a single line with several include: entries.
Too many DNS lookups in SPF
Evaluating an SPF record may cost at most ten DNS lookups. Every include:, a, mx and redirect counts, and an include: from a large provider can hide five on its own. Above ten, the recipient stops with an error and your SPF is worthless in practice. So remove services you no longer use from the record; that is the cause more often than you'd think.
DMARC without rua
A DMARC record without rua= works technically, but you receive no reports and so have no view of who is sending mail on behalf of your domain. Without those reports, you can never move to a stricter policy with any confidence: after all, you don't know what you would be blocking.
Where this stops
These three records govern who may send mail on behalf of your domain. They say nothing about the reputation of the sending IP address or about the content of your message, so they don't prevent mail from landing in spam in every case. DMARC reports also arrive as XML; if you have dozens of systems sending mail in your name, a specialised DMARC service that reads them for you is a better choice than doing it by hand.
Further reading
Was this article helpful?
Thank you for your feedback.
Thank you. What were you missing? Let us know at support@hostage.nl and we will add it to the article.
Related articles
- Set up an out-of-office reply in webmail Set up an automatic reply that starts and stops on the days you choose.
- Using webmail: logging in and finding your way Logging in to webmail and finding your way around folders, messages and settings.
- Change the webmail language and time zone Change the language and time zone of webmail in the preferences.
- Forward email automatically from webmail Forward mail from a mailbox to another address automatically using webmail.
Still stuck?
Send us a message. We will help you, usually within one working day.