All articles
    Deliverability

    How to Set Up an SPF Record for SendGrid: Complete Guide

    An SPF record is a DNS TXT record that lists the servers allowed to send mail for a domain. To authorise SendGrid, the record must include sendgrid.net.

    VeriMailX Team November 23, 2026 3 min read

    Key takeaways

    • With SendGrid's default Automated Security setting, you add the CNAME records SendGrid shows you and do not hand-write an SPF string.
    • If you turn Automated Security off, you publish an MX record and an SPF TXT record on the em hostname that SendGrid gives you, with include:sendgrid.net in it.
    • Either way, your root domain should have exactly one SPF record, and it must include SendGrid if you send from SendGrid for that domain.

    An SPF record is a DNS TXT record that lists the servers allowed to send mail for a domain. To authorise SendGrid, the record must include `sendgrid.net`. SendGrid's domain authentication flow can set this up for you through a CNAME, or you can publish the record yourself. Choose the mode first, because the two modes put different records on different hostnames.

    Research checked: 12 November 2026

    The short answer

    With SendGrid's default Automated Security setting, you add the CNAME records SendGrid shows you and do not hand-write an SPF string. If you turn Automated Security off, you publish an MX record and an SPF TXT record on the `em` hostname that SendGrid gives you, with `include:sendgrid.net` in it. Either way, your root domain should have exactly one SPF record, and it must include SendGrid if you send from SendGrid for that domain.

    Set up SPF for SendGrid

    Step 1: Choose the mode

    SendGrid's domain authentication page describes two options:

    • Automated Security on (default): SendGrid asks you to publish CNAME records. The `em####` CNAME points SPF authentication at SendGrid's own servers, and two DKIM CNAMEs handle signing.
    • Automated Security off: You publish an MX record on `em####`, an SPF TXT record on `em####`, and manual DKIM TXT records.

    Automated Security requires a DNS host that accepts underscores in CNAME names. If your host does not, turn it off.

    Step 2: Publish the records

    For Automated Security on, add the CNAME that SendGrid displays, of the form `em####.example.com` pointing to the target SendGrid shows. The `####` is the number assigned to your account. Copy the target exactly.

    For Automated Security off, the SPF record looks like this on the `em####` hostname:

    ``` em1234.example.com. TXT "v=spf1 include:sendgrid.net ~all" ```

    Enter only the hostname part, such as `em1234`, in DNS hosts that append your domain automatically. A full name in that field creates a doubled domain. Enter only the root domain, not `www` or a subdomain, when SendGrid asks for the sending domain.

    Step 3: Merge with an existing SPF record

    If your root domain already has an SPF record, do not add a second one. Two SPF TXT records on the same name make the check fail. RFC 7208 describes the evaluation: an `include` mechanism is evaluated recursively, and the total number of DNS-lookup terms is limited to 10. Combine the existing list with `include:sendgrid.net` in a single record, for example:

    ``` example.com. TXT "v=spf1 include:mailer.example.net include:sendgrid.net ~all" ```

    `mailer.example.net` here is a placeholder for your other senders. Count the lookups before you add more includes.

    Verify the record

    Step 4: Verify

    Return to SendGrid, select Verify, and wait for the records to resolve. SendGrid's page says DNS verification can take up to 48 hours after upload. Then check from a terminal:

    ``` dig +short TXT example.com dig +short CNAME em1234.example.com ```

    The root lookup should show one SPF string that contains `include:sendgrid.net`. The CNAME lookup should return the SendGrid target you were given.

    Worked example

    A team sends marketing mail through SendGrid and transactional mail through another provider. Its root domain has `v=spf1 include:mailer.example.net -all`. The fix is to edit that single record to `v=spf1 include:mailer.example.net include:sendgrid.net -all`, not to publish a second record. The example uses `-all`, a hard fail. Use `~all` if you want a softfail while you test. RFC 7208 says a softfail is a weak statement and receivers should not reject on it alone.

    Frequently asked questions

    Keep reading

    Comparisons

    Instantly vs Smartlead: How to Choose a Cold Email Platform

    Instantly and Smartlead both support cold email campaigns across multiple sending accounts. The better choice depends on your contact limits, sending volume, reply workflow, and the cost of the features you actually need. Start

    Read
    Comparisons

    Instantly vs Smartlead Deliverability: How to Compare Inbox Placement

    Neither Instantly nor Smartlead can guarantee that a cold email reaches the inbox. Both provide tools for managing outreach, but inbox placement also depends on your sending domain, authentication, recipient list, message and the

    Read
    Comparisons

    Instantly vs Smartlead Pricing: Compare the Real Cost of Outreach

    The headline subscription is only one part of a cold email budget. The right comparison includes sending limits, contact storage, mailboxes, lead data, verification and any tools needed for your team. A cheaper entry plan can

    Read