SPF: the list of who may send your email
SPF is a guest list for your email. It names the services allowed to send email from your address. Inboxes check the list, and email from anyone not on it looks fake.
What it is
SPF (Sender Policy Framework) is one TXT record at the root of your domain. It starts with v=spf1, lists the services that send email for you, and ends with a rule for everyone else: ~all (treat as suspicious) or -all (reject).
Every time an email arrives claiming to be from you, the receiving inbox looks up this record and checks whether the server that sent it is on the list.
What happens if it's not fixed
- The big inboxes now junk or reject email from domains with no SPF.
- Scammers can send email as you more easily, and it looks real.
- If you have two SPF records, both are ignored, which is the same as having none.
- Forget a service (like your invoicing tool) and its emails land in spam.
How to fix it
- List every service that sends email as you: your mailbox, newsletters, invoicing, your website's contact form, your shop.
- Ask each one for its SPF "include". DNSFix shows the common ones on the setup page.
- Build one record:
v=spf1, then each include, then~all. - Add it as a TXT record at the root of your domain (Name
@). If one already exists, edit it; never add a second. - Run the check again. When every sender passes for a few weeks, you can change
~allto-all.
Step by step at your DNS host
Check your domain and the report shows the exact clicks for your own DNS host. Not sure which company that is? Your nameservers tell you: find your DNS host.
Type: TXT Name: @ Value: v=spf1 include:_spf.yourmailhost.example ~all
Use the include your email service gives you. Add one include per sending service.
Steps for any DNS hostMost hosts ask for the same three things: type, name and value.
- Sign in to the company where your domain's DNS is managed (usually where you bought the domain).
- Find the DNS settings (often called DNS, Zone Editor, or Advanced DNS).
- Add a new record, or edit the existing one, using the values below, and save.
What to enter at your DNS host:
Type: TXT Name: @ Value: v=spf1 include:_spf.yourmailhost.example ~all
Questions
Can I have two SPF records?
No. Two SPF records make both invalid. Merge them into one record with every include in it.
Should I use ~all or -all?
Start with ~all. Once DMARC reports show every real sender passing, -all is a little stricter. With DMARC at reject, either works.
Related
- DKIM: the signature on your email
- DMARC: what inboxes do with fake email from you
- SPF's 10-lookup limit
- Services allowed to send as you
- Lesson: SPF step by step
- Help: How to set up SPF (with examples)
- Help: Multiple SPF records found
This page explains: SPF (who may send your email).