Set up SPF record for your domain

SPF or Sender Policy Framework is an authentication protocol that specifies which email servers or IPs are allowed to send and receive emails on behalf of your domain.

Receiving email servers check SPF records to acknowledge that you are the one sending emails from your domain.

SPF should list a range of IP addresses or email servers that are allowed to send from your domain.

This policy improves your domain’s reputation and helps prevent your emails from being marked as spam.

What does an SPF record look like? 

Here’s an example of an SPF record which consists of the following components:

v=spf1 ip4: ip4: ~all

Based on this example, the receiving server will know the list of allowed IP addresses/ third-party servers, and how to handle non-compliant emails.

Taking a closer look at each component, here’s how it works:

  • v=spf1 begins a record and tells the receiving server that this line contains an SPF record. 
  • tells the server what third-party email servers (Google, in this example) are authorized to send emails on behalf of the domain.
  • Next is the list of authorized IP addresses. In this example, the SPF record is telling the server that ip4: and ip4: are authorized to send emails on behalf of the domain.
  •  ~all this part should conclude every SPF record and tell the server that non-compliant emails should be marked as dangerous or spam but still accepted.

Check Your SPF Record Settings

You can check if your domain has an SPF record enabled with a tool like MX Toolbox.

On the MXToolbox website, select the SPF Record Lookup option and enter your domain name. 

Click the button next to it to do a lookup.

If you see No SPF Record found under Result, it means your domain does not have it. 

If your domain does have an SPF record published, you’ll see it in the lookup results. Confirm that your SPF record contains relevant IP addresses or mail servers.

How to set up SPF

Below is the general information about setting up SPF records. Remember that it may vary depending on your DNS and ESP provider settings. 

  1. Collect a list of IP addresses or email servers that you use to send email (you can get this information from your email provider)
  2. Create your SPF based on the example from previous chapter
  3. Go to your DNS settings (e.g., Namecheap, Cloudflare, Bluehost, etc.)
  4. Create a new record.
  5. Select TXT type and enter its name. 
  6. Add SPF record value.
  7. Save.
  8. Check with MxToolbox after some time. 

If you use one these providers, you can refer to the resources below to confirm the settings and add or update your SPF records accordingly.​

Google Workspace:



Office 365:


SPF configuration is specific to your own domain and does not involve your settings. We don’t have email servers so all emails are sent directly from your email provider. SPF record lists your ESP’s email server or IPs, not’s.

After enabling a proper SPF record you’re one step closer to making sure your emails are delivered.

The best approach to improve your domain’s reputation and authenticate your emails is to layer SPF with DKIM and DMARC.

Was this helpful?

Thanks for your feedback!

Sorry about that 😢

How can we improve it?