Help Center

Set up SPF Records

Your service provider is now using MailChannels Outbound Filtering to send email from the hosting server on which your account is located. Correct Sender Policy Framework (SPF) records need to be configured in your DNS settings to ensure that Internet receivers will properly identify and receive your email. This article describes the DNS records you must add.

DNS Records

The following records are needed for SPF to work correctly. Replace with your own domain name:





  v=spf1 a mx  ?all



If you already have an SPF record, simply add to this entry. Make sure to add it BEFORE the “all” mechanism as “all” always matches and typically goes at the end of the SPF record.

Note: DKIM keys can be added for Cpanel using our Cpanel - DKIM Configuration Guide.


For cPanel users
cPanel has made available a script "spf_install" to add spf records. The "spf_install" script allows you to add SPF records to all the user's domains' zone files from the command line.
Here is simple script with which you can add spf records on all cPanel account or on multiple account.

cd /var/cpanel/users
for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/spf_installer $i ;done

Note: Please test this thoroughly before implementing this on production servers


Next Step: Set up monitors


Was this article helpful?
3 out of 6 found this helpful
Have more questions? Submit a request


  • Avatar

    Do you know how to "mass add" these records to existing domains? I'm running cPanel, but that shouldn't make much difference. All the domains already have their own SPF records.

    Comment actions Permalink
  • Avatar
    active cares

    I am having the same question as "WebHostingZone"

    Comment actions Permalink
  • Avatar

    Messages that are signed via DKIM, and that get passed through your relay servers are getting munged. Making the digitally signed messages (and headers) appear as tampered with or spoofed.

    Comment actions Permalink
  • Avatar

    Why not use the stricter -all rather than ?all. I like to use -all so that mail servers paying attention to spf will not accept spam from compromised machines forging my addresses.

    Comment actions Permalink
  • Avatar

    And is there a WHM or cPanel plugin that automates this task every time a cPanel account is created or a new domain is added?

    Comment actions Permalink

Please sign in to leave a comment.