Overview
The following explains what Sender Policy Framework (SPF) records are and how they work at DreamHost.
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.
DreamHost SPF records
DreamHost adds the following SPF records automatically to your domain:
v=spf1 mx include:netblocks.dreamhost.com include:relay.mailchannels.net -all
Adding or editing SPF records
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.
Adding 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
Adding DreamHost's SPF record to your custom record
If you need to also add DreamHost's record of include:netblocks.dreamhost.com, edit your SPF record and add it after the custom Google record. For example:
v=spf1 include:_spf.google.com include:netblocks.dreamhost.com -all
Testing your SPF record
You can use online tools like the following to test your SPF record:
- SPF Record Testing Tools verifies the syntax of a record and performs a DNS lookup to check that the record has been published.
- Test the SPF record using Gmail or Yahoo
Contact forms and SPF records
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: