0

Hi I'm using a directadmin server's hosting. when my website send mail by php, it will use user@mydomain.com to send email out

but mydomain.com's email is hosting by google workspace

I was set to

v=spf1 include:mydomain.com include:_spf.google.com -all

but I got the error:

The domain's SPF record could not be resolved within 10 DNS queries.

How can I create a SPF record included my server and google workspace's server?

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
simonlo
  • 1
  • 1

1 Answers1

3

By adding include:mydomain.com to the spf record of mydomain.com you created an infinite loop. Leave it out, you want to use a or mx instead:

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

Note: you might want to use ~all instead of -all until you verified that your SPF record is working.

Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89
  • Thank you so much, so I just change to "v=spf1 a include:_spf.google.com -all" and this will include mydomain.com for that? thanks – simonlo Aug 31 '22 at 12:47
  • The `a` stands for the A record of your domain. If you send mails from that server that is correct. If you send mails from a different server you need to use that instead. If you only send mails from Google services and no other servers you don't need anything but the google include. – Gerald Schneider Aug 31 '22 at 12:55