How to Set Up SPF and DKIM for SendGrid

SPF DKIM SendGrid Email domain authentication

When you first set up SendGrid to send emails, you may find there is a "Via SendGrid" warning for the email in the recipient's mailbox.

This warning means you haven't authorized SendGrid to deliver emails for you, so the mailbox provider considers that sent from SendGrid instead of your brand.

To authorize SendGrid to send emails for you, you need to set up SPF and DKIM for SendGrid. This is a process also known as email domain authentication.

Setting up SPF and DKIM for SendGrid has 2 benefits:

  • your emails are more likely to reach the inbox;
  • the "Via SendGrid" warning is removed, and your emails are perceived as coming from your brand, instead of SendGrid. This boosts user engagement, as the user is more likely to open the email.

How to set up SPF and DKIM for SendGrid:

  1. Set up SPF

    You need to create a new SPF record or update your existing SPF record on your domain:

    • if you have no SPF record on your domain, simply publish the following SPF record on it:

      v=spf1 -all
    • if you already have an SPF record, simply insert right before the terminating mechanism in that record.

      For example, if your current SPF record looks like this:

      v=spf1 a -all

      update it to:

      v=spf1 a -all
  2. Set up DKIM

    Log in to the SendGrid dashboard using your credentials.

    Go to Settings/Sender Authentication/Authenticate Your Domain, choose your DNS host and click the Next button.

    Enter the domain you want to authenticate (e.g., and click the Next button.

    Now SendGrid has created 2 DKIM records for you, using selectors s1 and s2 respectively, as highlighted below:

    Then publish these 2 DKIM records for your domain in the DNS:

    Record Type Name Value TTL
    CNAME Default
    CNAME Default

    Note: replace the above records with your own.

Now email domain authentication is set up for SendGrid.

Previous Post Next Post

 Protect Business Email & Improve Email Deliverability

Get a 14 day trial. No credit card required.

Create Account