Setting up SPF records

An accurate SPF record will help improve the overall deliverability of your email messages and protect your domain against email spoofing.

Exact Hosting basic SPF record

Here is the most widely used SPF record in use for Exact Hosting email hosting customers:

v=spf1 include:spf.exacthosting.com ~all

SPF basics

SPF (sender policy framework) is a spam protection method based on the authorization of the email sender. The SPF record is simply a TXT record added to the DNS settings of your domain that defines which mail servers are authorized to send emails.

There are two important rules to consider when setting up or modifying your SPF record:

  1. You can only have one SPF record per domain. More will cause DNS conflicts, and the SPF records will not resolve.
  2. The Exact Hosting platforms have a 255-character limit. As a result, the full SPF record will need to be shorter than 255 characters.

Adding or modifying SPF records

If you already have an SPF record in place within your DNS or see that you have multiple SPF records, our team can help you decide what changes to make. Please reach out to our support team for assistance.

If you do not already have an SPF record configured in your DNS, adding one is fast and easy.

DNS management

  1. Sign into the Exact Hosting portal.
    exacthosting-login-button.png
  2. Find your domain list by selecting Domains followed by My domains.
    domains-my-domains.png
  3. Click on the domain name's row to see the overview page for your preferred domain.
    click-on-the-row.png
  4. Select DNS management from the domain overview page.
    dashboard-DNS-management.png
  5. After confirming no SPF record already exists, add the new record and click Save changes.
    SPF record save.png

Back to top

cPanel DNS

  1. Sign into the Exact Hosting portal.
    exacthosting-login-button.png
  2. Select Services followed by My services.
    services-my-services.png
  3. Select your cPanel plan from the list.
    services-small-website-hosting-with-cpanel.png
  4. Click Log in to cPanel from the side navigation.
    log-into-cpanel.png
  5. Choose Zone editor.
    cpanel-zone-editor.png
  6. Click Manage for the domain you're updating.
    cpanel-manage-domain.png
  7. Once you've confirmed no SPF record exists, click +Add record and select Add "TXT" record.
    cpanel-add-a-record.png
  8. Enter your domain name in the name field, base SPF record in the record field, then click Save record.
    cpanel-add-spf-record.png

Back to top

DNS hosting service

  1. Sign into the Exact Hosting portal.
    exacthosting-login-button.png
  2. Select Services, followed by My services.
    services-my-services.png
  3. Click DNS hosting service to see the overview page.
    click-on-dns-hosting.png
  4. Select Host records.
    host-records-dns-hosting.png
  5. Insert the SPF record and click Submit.
    submit-dns-hosting.png

Back to top

SPF record syntax

An SPF record consists of several parts, as noted below.

Please reach out to support if you have questions about advanced SPF configurations.

 

SPF part Relevance
v=spf1

Defines this TXT record as an SPF record. It is required for this syntax to be at the beginning of the value for each SPF record.

 a

Defines the DNS A record of the domain as a valid sending source.
Note: The above example does not include an "a" mechanism.

 mx

Defines the DNS MX record of the domain as a valid sending source.
Note: The above example does not include an "MX" mechanism.

 -all

Specifies that all emails sent through a different server than those already listed as "ok" will return a code of "hard fail." The email will not be delivered and will generate a bounceback email.

~all

If you want to allow an email sent through a different mail server to be delivered, you can force a "soft fail" by using the '~all' flag. Email sent through any unlisted mail servers will deliver to the recipient but be flagged as a suspicious sender.

Back to top

SPF configuration examples

Desired outcome Example
Specify a single IPv4 address that can send emails
v=spf1 ip4:209.59.191.64 -all

This record example would allow mail to be sent from a mail server at the IP address 209.59.191.64 only. 

Mail sent would not deliver from mail servers on any other IP address, and the sender would receive a bounceback.

Specify a range of IPv4 addresses that can send emails
v=spf1 ip4:192.168.0.1/16 -all

Allows mail to be sent from any IP address between 192.168.0.1 and 192.168.255.255.

Specify a mail server that can send
v=spf1 mx:mx1.domain.com  -all

Allows mail to be sent from a mail server named mx1.domain.com. The system would not deliver mail from any other mail server address, and the sender would receive a bounce message.

Specify multiple items in one SPF record
v=spf1 a mx ip4:209.59.191.64 mx:mx1.domain.com  -all

Allows an IP address and a mail server to send out emails.

Make the domain unable to send any emails
v=spf1 -all

All emails will bounce back to the sender.

Specify a single IPv6 address that can send
v=spf1 ip6:1080::8:800:200C:417A -all

Would allow mail to be sent from a mail server at the IP address 1080::8:800:200C:417A only. 

Specify a range of IPv6 addresses that can send
v=spf1 ip6:1080::8:800:200C:417A/96 -all

Allows mail to be sent from any IPv6 address between 1080::8:800:0000:0000 and 1080::8:800:FFFF:FFFF.

Specify another domain that can send email from the domain
v=spf1 include:anotherdomain.com  -all

Allows mail to be sent on behalf of this domain from servers resolving to other specific domain names.

Note: For this to work, anotherdomain.com's own SPF record must be valid.

Back to top

Was this article helpful? If not please submit a request here

How helpful was this article?