SPF Records

SPF Record for your server

You can create any simple record like:

v=spf1 a mx ptr ~all

Significance of every letter:

  • a means A-record. This means IP of this domain.
  • mx records indicate server which accepts mail for this domain. If same mail-server generate outgoing email, accept them.
  • ptr records can help you verify all subdomain for your server. Generally ptr record is linked to FQDN which is different than root domain. This part makes sure mails sent from host.example.com are also accepted.
  • ~all has 2 more variants -all and ?all.  ~ (tidal) results in soft-fail. – (minus) result in hard-fail. If you are new to SPF record, don’t use this. ? (question-mark) means neutral which is as bad as not using SPF at all IMHO!

If you need any help to get SPF record right, you can use spfwizard.com

SPF Record and Google Apps

If you are using Google Apps, then you may be using following for SPF record:

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

Now, in addition to Google’s server, your own web-server (where you are hosting your site) most likely sending emails on behalf of your domain.

You can add your server’s IP using a shortcut below:

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

If you compare with previous record, it has only an extra “a”, which means IP address(es) to which A-Record for your domain points.

We are using:

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

Testing SPF Record

You can use excellent web-based tool mail-tester.com.