Search code examples
outlookdnssendgridspf

Adding Sendgrid and Outlook SPF records to domain dns settings


I am recently having trouble with delivering my mail to Hotmail servers, and I noticed that SendGrid SPF is not set up on my DNS. Currently, in my DNS settings, I have an SPF setup out, as my domain emails are sent by outlook.

I have a TXT record with the Name:example.com and Value: v=spf1 include:spf.protection.outlook.com -all

Now if I want to add a SendGrid SPF do I simply just add a new record:

Name: example.com Value: v=spf1 a include:sendgrid.net -all

My DNS host is also Cloudflare

Or do I need to somehow combine these? Basically the issue I'm facing is the outlook is blocking my emails from its recipients and I am trying to add an SPF record to hopefully be authenticated.


Solution

  • You do need to combine them, like this:

    v=spf1 include:spf.protection.outlook.com include:sendgrid.net -all
    

    That said, your original record is a bit unusual record as it says that you only send through either outlook or sendgrid, so for example it means that a web server for your domain would not be able to send directly, and would also have to be configured to relay through those services too. If that's the way you want it, that's fine, but I thought I'd mention it. Similarly, it's common to include an mx mechanism in your SPF, as that says that anything that can receive mail for your domain can also send. To include both those options as well, it would change to this:

    v=spf1 a mx include:spf.protection.outlook.com include:sendgrid.net -all