Domain & DNS

SPF Record Generator

Tell receiving mail servers which services may send email for your domain, so your mail lands in the inbox instead of spam. Tick what you use and copy the TXT record.

Who sends email as your domain?

Your SPF record

Type
TXT
Host / name
@
Value

DNS lookups used: 0 of 10

What is an SPF record?

SPF (Sender Policy Framework) is a TXT record in your domain’s DNS that lists the servers allowed to send email as your domain. Receiving servers such as Gmail and Outlook check it: mail from a listed server passes, mail from anywhere else is treated as suspicious. Without SPF — and its partners DKIM and DMARC — your genuine emails are far more likely to land in spam, and anyone can forge mail that seems to come from you.

How to add it

  1. Tick every service that sends mail as your domain: your mailbox provider, your website (for contact-form mail), and newsletter or invoicing tools.
  2. Copy the value. In your DNS settings — at your registrar, Cloudflare, cPanel Zone Editor or hPanel DNS — add a TXT record with the host @ and paste it.
  3. Keep only one SPF record. If one already exists, merge the services into it; two SPF records make both invalid.

The 10-lookup limit

Each include and each a or mx term makes the receiving server do extra DNS lookups, and includes can contain more includes. The SPF standard allows 10 in total; beyond that the record fails. The counter here includes the nested lookups of each provider, so you can see when you are close to the limit.

Soft fail or fail?

Start with ~all (soft fail). Once you have confirmed with DMARC reports that all your real mail passes, you can switch to -all. In practice, DMARC decides what happens to failing mail, so ~all with a strict DMARC policy is common.

Frequently asked questions

What is the SPF record for Google Workspace?

v=spf1 include:_spf.google.com ~all, plus any other services you use.

Can I have two SPF records?

No. A domain must have exactly one SPF record; with two, receivers treat SPF as broken. Combine everything into one.

Does SPF stop my emails going to spam on its own?

It helps, but you also need DKIM (a signature your mail provider sets up) and a DMARC record. Use the DMARC Record Generator next.