Account

Glossary / SPF

SPF record: what it is and how it works

SPF (Sender Policy Framework) is a TXT record in your domain's DNS that lists the servers allowed to send email on the domain's behalf. Mail providers check it to tell your real messages from forged ones. Without a correct SPF record your mail lands in spam more often, and spammers find it easier to hide behind your domain.

Check your site

>

The domain publishes one TXT record that starts with v=spf1 and lists the services allowed to send its mail: your host, a newsletter tool, Google Workspace and so on. When another server receives a message that claims to come from your domain, it reads this record and compares the sender's IP address with the list.

A message from a listed IP passes the check, and one from any other IP is flagged as suspicious. The record ends with ~all (softfail) or -all (hardfail), which tells receivers what to do with servers that are not on the list.

SPF checks the technical sender address (Return-Path), not the From line a person sees. That is why it is used together with DKIM and DMARC.

Example

v=spf1 include:_spf.google.com include:spf.tomishost.com ~all

Common mistakes

Related terms