How do I add an SPF record?


This article explains about the default DreamHost SPF record and how you can adjust it.

If you are not using DreamHost nameservers, you must set up the SPF records with the current mail DNS provider instead.

Do I need to add SPF manually?

If you're using Google Workspace, you cannot update the SPF record. The field remains uneditable.

DreamHost automatically adds DreamHost's SPF records to your site. You only need to manually add an SPF record if you are also sending email through a third party. For example, you could also send mail through Google or Mailchimp. If you are sending email through services such as those AND also sending email from DreamHost, you'll need to add a custom SPF record that contains both mail servers.

View the following article for further details:

Adding an SPF record

You can only have a single SPF record. If you need to send from multiple servers, make sure to combine them all within the same SPF record.

The following example assumes you're sending email from Google and DreamHost, where the custom Google record AND DreamHost's SPF are added.

v=spf1 mx -all
  1. Navigate to the Manage Websites page.
  2. Open the Manage page for your site.
    • If you're in Grid view, hover over your website and click the Manage button.
    • If you're in List view, click the Manage button to the right of your website.
    DNS tab
  3. Click the DNS tab.
    Add Record button
  4. Click the Add Record button.
    Add A Record
  5. Hover over the TXT Record section and click the ADD link.
    Add A Record
  6. Enter the following:
    • Host: This field can be anything. Very often it’s left blank.
    • TXT Value *: Enter the SPF record value of this record to point to.
  7. Click the Add Record button to save.

Allow up to 6 hours for the DNS record to propagate after you save the record.

  • Keep in mind that SPF treats subdomains (such as separately, thus you may wish to specify SPF records both for and any hosts such as See SPF subdomain FAQ for more information.
  • Wildcard for TXT records are not supported by DreamHost. This is generally discouraged as well as stated in the following article: RFC 4408 §3.1.5.

Advanced SPF

An advanced SPF record includes more than just the default mail servers: it also has information on all other servers that send mail for the domain. The following is an example of an advanced SPF record:

v=spf1 ip4:321.321.321.321 mx ~all
Tag Description
Identifies this DNS record as an SPF version 1 record.
IP address of a specific server, such as your web server for scripts that send mail directly from that server. You can get your web server IP from the Manage Domains page. View the DNS article for further details.
Includes all of the SPF records from Google, which in this example is where the domain's mail service is hosted.
Includes all the SPF records for Shaw Cable in Canada, an ISP. In this example, mail from the domain is sometimes sent through the ISP's SMTP server.
Includes all of the MX servers the domain uses, listed in the domain's MX DNS records.
Says all other servers are not authorized, and only mail sent from the listed servers will 'pass'.

?all (question mark), -all (dash), or ~all (tilde)

The symbol before "all" indicates how strict the SPF record is enforced.

  • ?, question mark, makes the whole record inactive, as though the domain had no SPF record at all.
  • -, dash, makes the record strict, and any mail from servers not listed will be marked "fail" and may be marked as spam or rejected entirely.
  • ~, tilde, is between the other two options in strictness. Any mail from servers not listed will be marked "softfail". While intended for testing, it is recommended to be used to avoid delivery issues as noted in this article.

The following table shows SPF information for various mail providers that are in popular use:

Provider SPF Information
Campaign Monitor
Constant Contact
N/A (uses SenderID)
Shaw Communications Ltd.

See also

Did this article answer your questions?

Article last updated PST.

Still not finding what you're looking for?