How does the SPF record in DNS work?
How exactly does the SPF record in DNS work?
Usually, email for your domain is sent by just one or a few servers. With an SPF record, you can specify from which servers email is sent on behalf of your domain name. Receiving mail servers can then choose to reject email that was sent on behalf of your domain name but does not appear in the SPF record. By default, only the hosting server is in the SPF record, so if you send an email on behalf of your domain via, for example, xs4all, it could in theory be rejected by others. However, by no means all mail servers check SPF records.
The default SPF record at weboke.nl is: "v=spf1 a mx include:webawere.nl ~all". This allows mail to be sent on behalf of your domain from any WebOké server.
You can have your SPF record tested at http://www.mxtoolbox.com by entering spf:yourdomain.xx there. Please note that after changing an SPF record, it can take up to 10 minutes before it is included in our general DNS.
| 01. "v=spf1 a ~all" | Mail may be sent from the hosting server where your domain is hosted (in effect, from all A records in the DNS) |
| 02. "v=spf1 mx ~all" | Mail may be sent from the same mail server(s) where you receive mail. |
| 03. "v=spf1 mx a ~all" | 01 and 02 combined |
| 04. "v=spf1 a:voorbeeld.nl a:voorbeeld2.nl ~all" | Mail may be sent from the mail server at voorbeeld1.nl or voorbeeld2.nl (there can be more) |
| 05. "v=spf1 a mx a:voorbeeld.nl a:voorbeeld2.nl ~all" | 01, 02, 03 and 04 together. |
| 06 "v=spf1 ip4:83.96.159.44 ip4:83.96.159.45 ~all" | The same as example 4, but with IP addresses instead of domain names (you can also use both) |
| 07 "v=spf1 a mx mx:voorbeeld1.nl ~all" | As example 02, but mail is also sent from the mail server in the MX records of the domain voorbeeld1.nl |
| 08 "v=spf1 include:xs4all.nl ~all" | You send your mail via xs4all. You can also combine this with the other examples. |
| 09 What does ~all mean? | The mail servers listed in the SPF record may send mail for your domain. Another mail server can still send mail, but the mail will then be marked as unsafe or as spam. |
| 10 What does -all mean? | Only the mail servers in the SPF record may send mail for your domain. Mail from other servers will actually be rejected. |
