Emails going to spam - DKIM and SPF set up but not working correctly

All order emails from my Shopify store are going to spam. My email provider is google. I have verified my email with shopify, and in the DNS added the google DKIM and SPF for both shopify and google, but the emails are still going to spam with the error SPF Neutral with IP xxxxx and DKIM Fail.

Prior to moving to cloudflare the emails were going to the inbox and passing both DKIM and SPF, so there must be something wrong with the settings but I can’t figure out what!

Is it possible to attach a screenshot to show settings?

Is the IP covered by your SPF record?

Can you share the domain?

Hi Michael, thanks for your message! No the IP is not in my spf record at the moment, this is what my SPF is right now -

v=spf1 ~all ~all

The domain is

For starters, that record has two ~all instructions. You should change to have just one ~all at the end.
v=spf1 ~all

Thanks for your help, I’ll change that. Should I also add the IP in the spf? If so, what would be the correct way of writing it?

All IP addresses that are sending email should be included in the SPF. If the sender is not covered by the includes, then the ip4 directive is needed.

v=spf1 ip4: ~all

Thanks Michael.

Sorry I’m new to all this - I don’t understand what the ip4 directive is, should I write it exactly as you have above, or change the IP to the IP address that google mail has said is ‘Neutral’?

Is the address the address of one of your servers, or was it a Google address? is a documentation address, and would need to be replaced with the actual sending address if it is not covered by the includes.

I think it’s actually a shopify IP - the emails that are going to junk are sent by shopify under my email address, and is already in the includes, but could it work to add it and replace the address with the actual IP like below?

v=spf1 ip4: ~all

That is a SendGrid address, and is not covered by the include. You’ll need to investigate and adjust the SPF as needed. What addresses you need is outside the scope of this community.

Right ok, thanks, I’ve also realised it keeps on changing, it’s not the same for every email.
Is there anything else you recommend I investigate to help solve the issue?

Hello Safo,
you mite also like to try at the unix shell:

dig mx
dig spf

That would return: 300 IN MX 5 300 IN MX 10 300 IN MX 10 300 IN MX 1 300 IN MX 5
and also 3600 IN SOA 2037733626 10000 2400 604800 3600

  1. MX records have nothing to do with outbound mail.
  2. The SPF record type has been deprecated. spf info should be in a TXT record.

@tom49 thanks, I seem to already have the MX records as you have written, but don’t have an SOA record, only a NS record for

@sdayman thanks for your reply, yes the SPF is already in a TXT record.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.