How to configure SPF record

SPF Setup

SPF stands for Sender Policy Framework and it defines the servers that are allowed to send email on behalf of your domain. It is important to note that as of February 2024, Yahoo and Google require SPF in order to send email to these users. 

Step 1: Gather IP addresses of all servers that send email for your domain

Before setting up an SPF record, you need to identify all the IP addresses that send email for your domain. This includes your own mail servers and any third-party services you use (like email marketing tools).

  • Own Mail Servers: List the IP addresses of your SMTP servers.
  • Third-party Services: If you use services like Mailchimp, Salesforce, or others for sending emails, you'll need their IPs too.

Step 2: Create your SPF record

An SPF record is a TXT record in your DNS. Here’s how to format your SPF record:

v=spf1 ip4:<IP_ADDRESS_1> ip4:<IP_ADDRESS_2> include:<THIRD_PARTY_DOMAIN> ~all

Replace <IP_ADDRESS_1><IP_ADDRESS_2>, and <THIRD_PARTY_DOMAIN> with your actual data. Here’s what each part means:

  • v=spf1: The version of SPF being used.
  • ip4: This tag is followed by an IP address. Add an ip4 tag for each IP address authorized to send mail.
  • include: This tag allows you to include the SPF record of another domain, typically used for third-party email senders.
  • ~all: This tag defines how receivers should treat email from your domain that doesn’t match the IP addresses listed in your SPF record. ~all indicates a soft fail (suggesting receivers mark it as suspicious, but not outright reject it).

Keep in mind that each domain can only have one SPF record. If you need multiple values, you can extend your existing record.

Step 3: Publish your SPF record

Log into your domain’s DNS management panel and navigate to the section where you can manage your DNS records. Add a new TXT record with the values you formatted in Step 2.

Step 4: Test your SPF record

After publishing your SPF record, it’s important to test it to ensure it’s working correctly. You can use tools like:

Step 5: Monitor and update as required

Maintaining your SPF record is crucial. Whenever you change mail servers or start using a new email service, you need to update your SPF record. Regularly check and modify your SPF record to ensure it reflects your current email sending practices.

Common Mistakes to Avoid

  • Overlooking IP changes: If your email server’s IP changes or if you switch to a new email provider and forget to update your SPF record, your emails may start getting marked as spam.
  • Syntax errors: SPF records are sensitive to syntax, so even a small typo can invalidate your record.
  • Too many DNS lookups: Keep in mind that SPF records should not require more than 10 DNS lookups. This includes IPs and include statements.

 

Article Information
  • Article ID: 401
  • Category: Email
  • Viewed 2 times.
  • Rating:
    (0)
  • Was this article helpful?
  • Yes No
Did you find this article helpful?