What is the difference?
-
there's a very thorough write up [here](https://www.mailhardener.com/blog/spf-redirect-explained) that explains many of the nuances and potential pitfalls. – But those new buttons though.. May 12 '20 at 14:39
2 Answers
Pretty much what it says on the tin.
In the first case, domain 2's SPF record is included in the SPF record for domain1, but can still be modified eg by adding another A host that isn't permitted for domain2.com:
"v=spf1 include:domain2.com a:othermailhost.domain1.com -all"
In the second case, domain2's SPF record is used as the complete SPF record for domain1, and no further modifications are possible.
"v=spf1 redirect=domain2.com"

- 79,770
- 20
- 184
- 232
-
5include: is also handy if the SPF record is too big for for one record. You can create a TXT record on spf1.domain1.com and spf2.domain1.com with the spf split into two and include both in the TXT record for doman1.com. Of course if this is required, the outgoing mail setup is probably a bit nuts! – Niall Donegan Jan 05 '11 at 17:18
-
Good point! I would edit it into my answer, but that seems faintly naff. – MadHatter Jan 05 '11 at 17:43
-
1@NiallDonegan Welcome to the world of ugly hacks. :/ If you had that much IPs to check, you should possibly put them all in the A records of a `_mailhosts` domain, which you can then reference from the SPF record. – Bachsau Aug 17 '20 at 16:32
Here a short summary with the example, include will be used when your mail hosted on other servers eg: Gsuite Zoho or other email providers the format is "v=spf1 include:serverdomain.com include:_spf.google.com ~all"
and redirect is used to redirect your mail from the main server to another domain server. eg: "v=spf1 redirect=_spf.mailhostbox.com"
You can also use the best method to cover all type of configuration:
"v=spf1 +a +mx +ip4:192.168.1.2 ~all" Where +a indicate A RECORD of your domain, +mx cover MX record and IP cover IP address of your server. (note replace your server IP)

- 1
- 1
-
All of your examples don’t help explain the exact technical difference, and your advice at the end is unsolicited and therefore distracting. If the accepted answer is lacking a bit of information, feel free to add a comment as soon as your site reputation allows. – Amir Jan 01 '19 at 12:22