Mail setup

SPF, DKIM and DMARC with SendGrid.

The records SendGrid needs, where to find them, and the failure specific to this provider.

SPF

Add include:sendgrid.net to your existing SPF record. Do not create a second record: two SPF records mean neither works, and that is the most common mistake in this whole area.

A complete record with SendGrid alone looks like v=spf1 include:sendgrid.net ~all. If you use other sending tools, their includes go in the same record.

DKIM

Found in SendGrid settings, under Sender Authentication.

SendGrid's authenticated domain setup publishes CNAMEs that it controls, which handles rotation. It typically uses a subdomain for sending.

SendGrid publishes keys under the selector s1 and s2, which is what an external check looks for.

DMARC

DMARC is the same regardless of provider, because it is your instruction rather than theirs. Start at v=DMARC1; p=none; rua=mailto:you@yourdomain.com, read the reports for a few weeks, authorise everything legitimate, and only then tighten. The DMARC guide covers the order in detail, and the order is what stops you blocking your own invoices.

Worth knowing with SendGrid

SendGrid accounts are frequently set up by a developer for one feature, such as password resets, and then forgotten in the SPF record long after the feature moved elsewhere. It is one of the most common unnecessary includes we find.

Check it afterwards

Publishing the records is not the same as them working. Verify from outside: whether SPF passes, whether a DKIM signature is actually present, and how many lookups your SPF now performs. The free mail check answers all three in plain language.

Related

Check yours

Check whether your mail is actually passing.

Plain answers rather than policy strings. Free, no account.

Using a different mail provider?

The records differ per provider, and so do the mistakes.

Mailchimp and Mandrill · Proton Mail · Google Workspace · Zoho Mail · Mailgun · SMTP2GO

All 20 in this set