SPF overview

 

Overview

Sender Policy Framework (SPF) records are email DNS records that specify which mail servers are permitted to send email from your domain. This article explains how SPF records work at DreamHost and how to add or edit them.

What are SPF records?

SPF records are email DNS records that specify what mail servers are permitted to send email from your domain. Receiving email servers use these records to check the envelope sender to approve or reject incoming email, thereby helping to reduce spam/spoofing from spammers.

The following sections assume your email is hosted at DreamHost. If you are not using DreamHost nameservers, you must set up the SPF records with the current mail provider instead.

Keep in mind that SPF treats subdomains (such as sub.example.com) separately, thus, you may wish to specify SPF records both for example.com and any hosts such as yourhost.example.com.

What SPF records does DreamHost add automatically?

DreamHost adds the following SPF records automatically to your domain:

v=spf1 mx include:netblocks.dreamhost.com include:relay.mailchannels.net -all

How do I add or edit an SPF record?

This section explains how to add or edit an SPF record.

Adding a custom SPF record automatically removes the default DreamHost record. If you need it back, you must manually add it, as shown below.

If you delete your custom SPF record, the DreamHost SPF record is added back automatically.

How do I add a custom SPF record?

View the Adding custom DNS records article for instructions on how to add/edit a TXT record. A custom Google SPF record may look like this:

v=spf1 include:_spf.google.com ~all

How do I add DreamHost's SPF record to my custom record?

If you need to also add DreamHost's record, edit your SPF record and add it after the custom Google record. For example:

v=spf1 include:_spf.google.com include:netblocks.dreamhost.com include:relay.mailchannels.net -all

How do I test my SPF record?

You can use online tools like the following to test your SPF record:

How do contact forms and SPF records work together?

Make sure that any contact form on your website is configured to use SMTP. This ensures the email is sent from the mail server and uses the correct SPF records. View the following articles for further information:

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?