How to integrate SendGrid with Cloudflare?

I’ve followed the instructions that SendGrid has provided however, my transactional emails from woocommerce are still not being delivered.

Is there anyway to make sure I’ve implemented SendGrid correctly on Cloudflare?

Thank you!

Can you please provide a link to said instructions, so we could see where might be the culprit? If you don’t mind sharing your domain name, it will also help to query your domain and see what you did.

In general, the only integration I can think of, is for verification purposes and/or message signing. Or in other words, setting up of TXT/CNAME records in your domain’s DNS. There’s not much to get wrong there with regards to Cloudflare’s part, with the sole exception of setting up of CNAME records that are used in validation: in Cloudflare, if you set up a CNAME and you do NOT disable the “go through Cloudflare” feature by clicking the orange cloud so it becomes grey, then what gets added to the DNS is not the CNAME you have requested, but instead an A record pointing to Cloudflare’s servers (who, in their backend, resolve your CNAME and proxy to it).

So side of copy/pasting correctly TXT/CNAME records and making sure that no orange cloud appear next to the CNAME, I don’t think anything could be special in Cloudflare for your matter. Maybe I’ll think differently if I see the instructions you were following.

P.S. Are your e-mails really “not delivered”, or are delivered and just find themselves at Junk Mail / Spam folders? What does SendGrid’s log show? That they received the e-mail, try to distribute it, and… what happens?

thank you for your quick response!

i followed the following 3 sets of instructions:


all new entries are greyed out.

i’ve been creating a new wordpress/woocommerce account for testing using my own gmail and aol account. after i create a user, the user is supposed to receive link to set their password. these emails are showing up on SendGrid as “Processing”. I clicked on each test email to see the details and see that the message is deferred multiple times with the message “Email was deferred due to the following reason(s): [IPs were throttled by recipient server]”

I have woocommerce set up to notify me via email about a new account as well, those work fine. I’m thinking only because it’s to the same domain, however. The domain is

thanks again!

Thank you for the additional information. I have looked at your domain, and your TXT records. You seem to have an SPF record, but I don’t see sendgrid’s SPF record ( there. Also I don’t know what CNAME they suggested to point to so can’t test for it, and finally what subdomain you’ve used for DomainKeys.

But SPF is really the base - and publishing an SPF record that does not have the IP range you originate your e-mails from [as seen from the receiving party’s side] is probably a worse signal than having no SPF at all…

do you see sendgrid’s SPF record now? Sendgrid’s documentation says “Most of our senders have set up a CNAME that points their sending domain to This means the receiving server sees the CNAME pointing to, and checks that SPF record instead. So do not be surprised if most of the SPF records you query are identical.” However, i added what you suggested anyway. it’s in a txt record.

Yes, I can see it now. And yes you’re correct that you could set a CNAME to point to them, and then they send the e-mail as from with their CNAME, and then they publish the TXT record for their name.

I may have missed it, but I think you didn’t mention that you added a CNAME pointing to them and that you’ve set sendgrid to use that. If you did, then I was looking at the wrong place and would need the subdomain.yourdomain to query, see that it goes to sendgrid, then query sendgrid to validate the SPF.

While I do see an SPF, the generic one is like I wrote - - you had that, and then you changed it to something that looks like the CNAME target. This will probably also work, but is redundant, because that you’re including, itself publishes a - so you’re basically causing an extra lookup with no gain.

i’ve only added the records that the instructions required in the 3 links above. - is that what you need?

SPF was changed back to what you recommended. points to which is which is GoDaddy.

You are saying you followed the directions of SendGrid and have set up an e-mail subdomain for them. is not the one because it is both not a CNAME, nor does it point to an IP owned by SendGrid.

So, IF you’ve set it up, it would be another CNAME. Maybe the CNAME is to which you’ve mentioned before. And if you haven’t and have set up SendGrid to use that CNAME, then when the recipient mail server will query it, it will get a non existent record…

If you have NOT set it up, then just on your main domain, and having SendGrid send as [email protected] might be OK. It has been years since I last touched SendGrid. When I did it, I went and created the CNAME they requested, and it worked flawlessly.

my mistake, yes the CNAME is to

all the CNAME records show as verified on the SendGrid dashboard - the one above, plus two domain keys

If so, then it sounds you should be fine from both Cloudflare and SendGrid side, I think.

If it still doesn’t work, I think your best venue is actually SendGrid’s support.

There’s an option that the issue is elsewhere - if you’re on the cheap SendGrid plan, your IP is shared with many other users of SendGrid. That sometimes causes your IP to get blacklisted (from experience) even if you did not send any spam. Where I had this set up, we had to bump our subscription level to get our own IP, and then all temporary blocks went away. But it wasn’t cheap I recall… like x3 premium or so.

Anyway, I would try to fire a new e-mail at this point, and if it’s still stuck with the remote server “throttling” your IP, have SendGrid’s support take a look.

Hope this helps…

This topic was automatically closed after 31 days. New replies are no longer allowed.