Skip to content

Free tools / SPF record generator

SPF record generator

Tick who sends email for your domain and copy the record. The lookup limit is counted as you go.

  • Updates as you type
  • Counts the 10-lookup limit
  • Runs in your browser
Which services send email for your domain? Tick all that apply
Also allow
Mail from anywhere else should be

What an SPF record does

SPF (Sender Policy Framework) is a single line of text in your domain's DNS that lists who is allowed to send email as your domain. When a message arrives claiming to be from you, the receiving server looks up that line and checks whether the server that delivered the message is on it.

Without one, anyone can send mail that claims to come from your domain and receivers have little to go on. With one that is wrong, your own mail can land in spam.

How to use the record

  1. Tick every service that sends mail for your domain. Think beyond your mailbox: newsletters, invoices, your shop, your helpdesk.
  2. Copy the value.
  3. In your DNS provider, add a TXT record with the name @ (some providers want the domain itself, or leave the name empty) and paste the value.
  4. Check it with the domain check.

The rules that trip people up

  • One record only. A second SPF record breaks both. If you already have one, edit it.
  • Ten lookups. Each include, a and mx costs a DNS lookup, and some includes contain more inside them. Past ten, receivers stop and treat SPF as failed. The counter above shows what you've used.
  • ~all or -all. ~all marks other senders as suspicious; -all tells receivers to reject them. Start with ~all.
  • SPF alone is not enough. It checks a hidden address, not the From line people see. Add DKIM and DMARC to close the gap.

Questions

Where do I add an SPF record?

In the DNS settings of whoever runs your domain: your registrar or a DNS host such as Cloudflare. Add a TXT record on the domain itself and paste the value as it is.

Can I have two SPF records?

No. A domain must publish exactly one. To allow another service, add its include: to the record you have.

What is the difference between ~all and -all?

~all is a soft fail: mail from unlisted servers is accepted but treated with suspicion. -all is a hard fail: receivers are told to reject it. Use ~all until you are sure every legitimate sender is listed.

My service isn't in the list. What do I enter?

Its documentation gives an include name, usually on a page about SPF or domain authentication. Type that name into "Other services".

More free tools