How to create an SPF record

In this article, we’ll show you how to create an SPF record for a domain in your HostPapa cPanel. Already have an SPF record and need to update it? Please read our tutorial on how to update an existing SPF record.

What is an SPF record?

Sender Policy Framework (SPF) is a relatively new protocol used for fighting spam. SPF uses a TXT record in a file located in a domain’s DNS zone to specify a list of authorized host names or IP addresses from which emails can originate. Once configured, email servers can verify SPF records that incorporate SPF verification in their anti-spam measures.

Note: Before making DNS updates, please confirm the provider’s name that currently manages your domain name’s name servers. You may quickly check the current name servers in public WHOIS or HostPapa Dashboard > My Domains > Whois Lookup. The HostPapa name servers are found inside the welcome email received at signup or via Dashboard > My Support > Welcome Emails. The DNS updates should be made at the provider of the name servers for the changes to take effect.

How to create an SPF record

When a new hosting account is created with HostPapa, the SPF record will exist by default. You can easily add options to it by following these steps:

1) Log in to your HostPapa dashboard.


2) Select My cPanel from the navigation bar at the top of the page.


3) In the Domains section, select the Zone Editor option.


4) Locate the domain name that you want to edit and click Manage.


5) In the upper right corner of the chart, click the + Add record button.


6) Ensure that the type is a TXT record. Note: SPF is added as a TXT record used by DNS to identify which servers are allowed to send mail on behalf of your custom domain.


7) Enter valid zone name and text record:


Valid zone name: Your domain name
Text: Enter the SPF record given by your email provider. This is used to identify which servers are allowed to send mail on behalf of your custom domain.

Example: Using SPF record from Google and including HostPapa’s server

Valid zone name:
TTL: 14400
Text: v=spf1 mx ip4: -all

  • *v=spf1: Sets the SPF version being used
  • *mx: The domain’s MX record is allowed to send email 
  • *include: Includes which servers are also authorized aside from the current email server
  • *ip4: Indicates which IP address is also authorized
  • *all: Determines how strict the rule is; 
  • ** **-all: Fail – The servers not included in the SPF record are not authorized to send an email. Unauthorized emails will be rejected.
  • **~all: Softfail – If the email is received from a server not included in the SPF record, the email will be marked as a soft fail. The emails will still be accepted but will be marked.

8) Click Add record.

Important: Please double-check that you have entered the correct information into each field. DNS records are very sensitive, and even a tiny mistake can cause problems that may affect your live website, email, etc.

Please be advised that the propagation may take 1-2 hours to complete.

To learn how to update your new SPF record, or to read a complete guide to DNS records, check out these Knowledge Base articles:

If you need help with your HostPapa account, please open a support ticket from your dashboard.

Related Articles

This post is also available in: FrançaisEspañol
Get online with our affordable web hosting

Get online with our affordable web hosting

Learn more now
HostPapa Mustache