This site utilizes JavaScript to function correctly. Looks like it's disabled on your browser. Please enable it for your best experience.

For instructions on enabling JavaScript, click here

Skip to main content

Just Host Web Hosting Help

SPF Records - VPS Dedicated

SPF Records (VPS & Dedicated)

Protect your email reputation and combat email spoofing by setting up a Sender Policy Framework (SPF) record. It's a type of DNS record that notifies the recipient's mail host which mail servers are authorized to send email from your domain name, making it much more difficult for someone to spoof your email address trying to impersonate you.

This article outlines what you need to know about SPF records and how they can be implemented at Just Host for VPS and Dedicated hosting. If you are using Shared hosting, check out SPF for Shared.



Using SPF Records with VPS and Dedicated Hosting

On our VPS and Dedicated hosting plans, email is sent out directly from the server. The default SPF record authorizes the IP address of the VPS or Dedicated server, so each one is different. Here is an example of what the default SPF record would be for a server at 198.51.100.123.

v=spf1 +a +mx +ip4:198.51.100.123 ~all

This record is composed of three parts:

  1. v=spf1 specifies that this is an SPF record.
  2. +a +mx +ip4:198.51.100.123 authorizes sending from the domain's A record, MX record, and ipv4 address 198.51.100.123.
    • This is the part of the record where you can add IP addresses and include SPF rules for other domains.
    • Third-party email marketing tools often require that you update your SPF record to accommodate their servers.
  3. ~all specifies how hosts should regard servers that are not on the list. There are a few modifies you can use here:
    • -all "Hard Fail" means reject all mail that isn't on the allowed list.
    • ~all "Soft fail" means accept mail not on the allowed list, but treat it with more scrutiny.
    • ?all "Neutral" means accept all mail; there isn't a policy for servers not on the list.

Customizing SPF Records

If you're using another host to send email for your domain, customize your SPF record by adding additional servers and IPs to the second part of the record. And if you want to make your record more strict to defend the domain from email spoofing, adjust the policy for "all."

For example, if your domain only used the address 198.51.100.123 for outgoing mail and you want to make the sending policy as strict as possible, you could use this SPF record:

v=spf1 ip4:198.51.100.123 -all

This record authorizes sending mail from 198.51.100.123 only; no other servers authorized.

For a more in-depth look at SPF syntax and mechanisms, see openspf.org.


How to add an SPF Record

SPF records are added to your Zone File as TXT records. Keep in mind that, by default Just Host adds an SPF record to your zone file for each domain; so if you want to add another record, it's best to delete the default one from inside your cPanel.

  1. Log in to your Just Host control panel
  2. Go to the Domains menu at the top and click the Zone Editor sub menu.
  3. Select your domain name from the drop-down.
  4. If you're removing an existing SPF record, scroll down to find it in the TXT record section to find it and click Delete.
  5. To add a new SPF record, enter this information under Add DNS Record at the top of the Zone Editor:
    • Name: Type your domain name (without the www)
    • TTL: 14400
    • Type: TXT
    • TXT Value: This is where you would paste in your new SPF record.
  6. Click Add Record.

You're done!


Knowledgebase Article 108,536 views bookmark tags: dedicated email prevent spf spoof spoofing vps


Was this resource helpful?

Did this resolve your issue?


Please add any other comments or suggestions about this content:





Recommended Help Content

Sender Policy Framework records, or SPF records are a type of DNS record used to identify which mail servers should be allowed to send email from a certain domain name.
Knowledgebase Article 237,945 views tags: email prevent spf spoof spoofing

Explanation of how to recognize spoof mail and what can be done to prevent it
Knowledgebase Article 300,804 views tags: email spam spoof spoofing

I would like to change my MX Record so I can use a mail server with another provider.
Knowledgebase Article 634,687 views tags: dns email exchanger local mail mx remote routing

Related Help Content

Trying to send out emails from multiple email accounts fail from both webmail and third party email clients. Possible Reasons: The maximum emails per hour has been exceeded. This can be caused by forw
Knowledgebase Article 566,978 views tags: email exceeded mailbox outlook quota receive receiving send sender unable

This article will explain how to view the email logs on a Dedicated or VPS server. This may be usefull if you are experiencing trouble with your email.
Knowledgebase Article 133,367 views tags: dedi dedicated logs mail vps whm

This article will explain how to restart the email related services on a Dedicated or VPS server. This may be useful if you are experiencing trouble with your email.
Knowledgebase Article 131,858 views tags: dedi dedicated dovecot exim mail restart vps whm

This article will explain how to clear the outbound mail queue on a dedicated or VPS server.
Knowledgebase Article 136,475 views tags: dedi dedicated mail queue vps

What is your Spam and bulk email policy?
Knowledgebase Article 313,540 views tags: email policy

As the registrar, we will assist in the following domain dispute, providing the specific criteria is met. The domain has been moved without the domain owner's consent by means of the password or EPP c
Knowledgebase Article 353,139 views tags: dispute domain epp icann moved owners ownership permission policy proof

How to modify name servers with bought domain through Just Host.
Knowledgebase Article 712,925 views tags: dns domain manager nameservers servers

How to setup name servers for multiple cPanel accounts.
Knowledgebase Article 259,256 views tags: accounts custom dedicated multi multiple nameservers server servers

** Google ad credits are only available to customers in the United States, Canada, and the United Kingdom at this time.

¹ VAT (Value Added Tax) is not included in our advertised price and will be charged separately and itemized on invoices and billing information. Standard VAT rates based on EU Member State regulations may apply. Learn more.