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 its behalf. Mail providers check it to tell your real messages apart from spoofed ones. Without a correct SPF record, your mail lands in spam more often and anyone can forge your address.

Check your site

>

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

If the IP is on the list, the message passes; if not, it is flagged as suspicious. The record ends with ~all (softfail) or -all (hardfail), which tells receivers what to do with any server that is not listed.

One catch: SPF checks the technical sender address (Return-Path), not the From line a person actually sees. That is why SPF works together with DKIM and DMARC rather than on its own.

Example

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

Common mistakes

Related terms

Found problems?

Slow hosting, SSL trouble or frequent downtime? Move to TomisHost: fast hosting with free SSL, daily backups and free migration help.

TomisHost hosting