Skip to main content

domain name system - SPF record (DNS)

Please help to set up a SPF record. I have found several SPF record generators but all questions are too complicated and I am afraid to make something wrong.



I want to allow sending mail only from:



1) from all IP addresses that are listed as A records for this domain.
2) from other servers in my data center in the same IP range
2) from Gmail servers - my domain is set up to use Gmail (all MX records are Google's MX records). Google's instructions say to include include:_spf.google.com ~all in the SPF record. Do I need mx in this case?




Which is correct:



v=spf1 a ip4:111.222.333.0/24 include:_spf.google.com ~all



or



v=spf1 mx a ip4:111.222.333.0/24 include:_spf.google.com ~all



Thanks.

Comments