Sending emails through SendGrid requires proper domain authentication so receiving mail servers can verify that your messages are authorized. A SendGrid SPF record helps authenticate the sending domain used in the email's return path. However, SendGrid's setup is slightly different from simply copying an SPF TXT value into your root domain.

Depending on whether you enable Automated Security or choose manual authentication, SendGrid provides different DNS records. Understanding this difference helps you avoid duplicate SPF records, incorrect DNS entries, and authentication failures.

This guide explains how SendGrid SPF authentication works, which DNS records to add, how to verify your configuration, and how to troubleshoot common problems.

Quick Answer: What Is the SendGrid SPF Record?

The SendGrid SPF configuration depends on your domain authentication settings.

  • Automated Security enabled: SendGrid provides a CNAME record for its branded return-path domain and manages the associated SPF authentication.
  • Automated Security disabled: SendGrid provides a manual SPF TXT record. Its documented example is:
v=spf1 include:sendgrid.net ~all

This is an example of the manual configuration, not a universal record to add to every domain. Use the exact DNS values generated in your SendGrid account.

Important: Do not add a second SPF record to your root domain just because you are using SendGrid. Follow the generated configuration and keep each DNS hostname to one SPF policy.

Table of Contents

  1. What Is a SendGrid SPF Record?
  2. How SendGrid SPF Authentication Works
  3. SendGrid Automated Security vs. Manual Setup
  4. How to Set Up SendGrid SPF Authentication
  5. How to Add SendGrid DNS Records in Cloudflare
  6. How to Verify Your SendGrid SPF Record
  7. Common SendGrid SPF Errors and How to Fix Them
  8. SPF, DKIM, and DMARC: What Is the Difference?
  9. SendGrid SPF Best Practices
  10. Frequently Asked Questions

1. What Is a SendGrid SPF Record?

A SendGrid SPF record is part of the email authentication configuration that allows receiving mail servers to check whether the server sending an email is authorized to send on behalf of the relevant envelope-sender domain.

SPF stands for Sender Policy Framework. It is a DNS-based email authentication protocol that identifies which sending servers are permitted to send messages for a domain.

When you use Twilio SendGrid, your email's visible From address and its return-path address may use different domains.

For example:

The receiving server can use the return-path domain to perform an SPF check.

This distinction matters because adding an SPF record to example.com does not automatically authenticate every subdomain used by your email service.

Why Does SendGrid Need SPF Authentication?

SPF authentication helps receiving mail servers determine whether the sending infrastructure is authorized to use a domain in the email delivery process.

Correct authentication can help:

  • Reduce the risk of unauthorized email spoofing.
  • Establish a consistent authentication configuration.
  • Support DMARC authentication when SPF alignment is satisfied.
  • Identify problems with unauthorized sending sources.
  • Improve the reliability of your email authentication setup.

However, SPF authentication alone does not guarantee inbox placement. Your sending reputation, recipient engagement, message quality, and other authentication signals also matter.

2. How SendGrid SPF Authentication Works

When you send an email through SendGrid, the receiving mail server evaluates the authentication information associated with the message.

Here is a simplified example:

  1. Your application sends an email through SendGrid.
  2. SendGrid processes and delivers the message.
  3. The message contains a return-path address associated with your authenticated sending domain.
  4. The receiving mail server checks the SPF policy for that return-path domain.
  5. The server compares the sending IP address against the authorized sending infrastructure.
  6. The SPF evaluation returns a result such as pass, fail, softfail, or neutral.

The exact DNS configuration depends on the authentication method selected in SendGrid.

What Is the SendGrid Return Path?

The return path, also known as the envelope sender, identifies where receiving mail servers should send delivery-related feedback, such as bounce notifications.

SendGrid uses a branded return-path subdomain during domain authentication.

For example:

em1234.example.com

The actual subdomain is generated during your SendGrid authentication setup.

This subdomain allows SendGrid to manage authentication separately from your primary domain's email configuration.

It is important to understand that the return path is not necessarily the same as the visible From address.

3. SendGrid Automated Security vs. Manual Setup

SendGrid provides two main approaches to domain authentication.

The DNS records you receive depend on which option you select.

Option 1: Automated Security Enabled

Automated Security allows SendGrid to manage important SPF and DKIM authentication details through DNS records.

With this option, SendGrid generally provides:

Record typePurpose
CNAMESupports the branded return path and SPF authentication
CNAMESupports DKIM authentication
CNAMESupports the second DKIM selector
TXTProvides a DMARC record when included in the generated setup

An illustrative example of the records looks like this:

TypeHostValue
CNAMEem1234.example.comSendGrid-generated destination
CNAMEs1._domainkey.example.comSendGrid-generated DKIM destination
CNAMEs2._domainkey.example.comSendGrid-generated DKIM destination
TXT_dmarc.example.comv=DMARC1; p=none;

These are illustrative hostnames, not values to copy into your DNS provider. Your SendGrid account generates the actual records.

SendGrid can manage the SPF and DKIM configuration associated with its authentication setup, including updates related to dedicated IP addresses.

Option 2: Automated Security Disabled

If you turn off Automated Security, SendGrid provides records that you must manage manually.

Its documented example includes:

Record typeHostValue
MXem1234.example.commx.sendgrid.net
TXTem1234.example.comv=spf1 include:sendgrid.net ~all
TXTm1._domainkey.example.comSendGrid-generated DKIM key
TXT_dmarc.example.comv=DMARC1; p=none;

The actual values may differ depending on your account and configuration.

With manual setup, you are responsible for maintaining the DNS records when your sending configuration changes.

Which SendGrid Authentication Method Should You Choose?

For most users, Automated Security is a convenient option because SendGrid manages SPF and DKIM-related authentication records.

Manual setup may be useful when your DNS environment or authentication requirements need more direct control.

Do not mix records from different setup methods without understanding how they work together. Use the records generated for the method you selected.

4. How to Set Up SendGrid SPF Authentication

Follow these steps to configure SendGrid domain authentication.

Step 1: Log In to Your SendGrid Account

Open your Twilio SendGrid account.

Navigate to:

Settings → Sender Authentication

Find the Domain Authentication section.

Step 2: Authenticate Your Domain

Select the option to authenticate a domain.

SendGrid will ask you to enter the domain you want to authenticate.

For example:

example.com

Choose the DNS host provider where your domain's DNS records are managed.

If your DNS is hosted on Cloudflare, select Cloudflare when available.

Step 3: Configure Advanced Settings

SendGrid provides additional authentication settings.

Review the Automated Security option.

If you enable it, SendGrid will generate the CNAME records required for its managed SPF and DKIM authentication.

If you disable it, SendGrid will provide the manual DNS configuration.

You may also see options for a custom return path or custom DKIM selector.

Choose these settings according to your actual email authentication requirements.

Step 4: Copy the Generated DNS Records

After selecting your settings, SendGrid displays the DNS records you need to add.

Copy each record carefully.

Pay particular attention to:

  • Record type
  • Hostname
  • Destination or value
  • DNS provider formatting
  • Any existing records using the same hostname

Do not replace the generated values with generic examples from another website.

Step 5: Add the DNS Records

Log in to your domain's DNS provider.

Create the records exactly as displayed in SendGrid.

For example, if SendGrid generates a CNAME record for your return-path subdomain, add that CNAME rather than manually creating an unrelated root-domain SPF record.

Step 6: Verify Your Domain

Return to SendGrid.

Open the domain authentication configuration and select the verification option.

SendGrid checks whether the required DNS records are available and correctly configured.

DNS changes may take time to propagate. If verification fails immediately, check your records before making additional changes.

5. How to Add SendGrid DNS Records in Cloudflare

If Cloudflare manages your domain's DNS, you can add SendGrid's generated records through its DNS dashboard.

Step-by-Step Cloudflare Setup

  1. Log in to your Cloudflare account.
  2. Select your domain.
  3. Open the DNS section.
  4. Select Records.
  5. Click Add record.
  6. Choose the record type shown in SendGrid.
  7. Enter the generated hostname.
  8. Enter the destination or value.
  9. Save the record.
  10. Repeat the process for the remaining records.

Example: Adding a SendGrid CNAME Record

Suppose SendGrid provides the following illustrative record:

FieldExample
TypeCNAME
Nameem1234
Targetu123456.wl.sendgrid.net

In Cloudflare, the record would look like this:

Type: CNAME
Name: em1234
Target: u123456.wl.sendgrid.net

Use the actual target generated by your SendGrid account.

Should SendGrid DNS Records Be Proxied in Cloudflare?

For email authentication CNAME records, use DNS only rather than Cloudflare's orange-cloud proxy.

Email authentication records must resolve to the destinations expected by SendGrid. Cloudflare's web proxy is designed for supported web traffic, not for proxying email authentication records.

Also, check that you are not creating a CNAME where another record already exists at the same hostname.

6. How to Verify Your SendGrid SPF Record

Adding DNS records is only part of the process. You should verify that the records resolve correctly and that actual emails pass authentication checks.

There are three useful ways to check your configuration.

Method 1: Verify Domain Authentication in SendGrid

Open:

Settings → Sender Authentication → Domain Authentication

Find your authenticated domain and check its verification status.

If SendGrid reports that the records are not verified:

  • Confirm the hostnames.
  • Check the destination values.
  • Look for conflicting DNS records.
  • Allow time for DNS propagation.
  • Verify that you selected the correct authentication method.

Method 2: Check DNS Records Using a Lookup Tool

Use a DNS lookup tool to inspect the relevant record.

For example, use the LeadNurturix SPF Checker to inspect the published SPF policy and the DNS Lookup tool to investigate TXT, CNAME, and MX records.

For Automated Security, check the generated return-path CNAME.

For Manual Security, check the SPF TXT record at the hostname provided by SendGrid.

You can also use a terminal command.

For example:

nslookup -type=TXT em1234.example.com

For a CNAME record:

nslookup -type=CNAME em1234.example.com

Replace the example hostname with your actual SendGrid hostname.

Method 3: Check the Email Authentication Results

Send a test email through SendGrid to an account where you can inspect the full message headers.

Look for the Authentication-Results header.

You may see results similar to:

spf=pass
dkim=pass
dmarc=pass

These are examples of successful authentication results.

A successful SPF result means the sending IP passed the SPF evaluation for the relevant envelope-sender domain.

Do not assume that SPF passing automatically means DMARC passes. DMARC also requires alignment with the visible From domain through SPF or DKIM.

7. Common SendGrid SPF Errors and How to Fix Them

Even after adding the required DNS records, you may encounter authentication problems.

Here are some common issues and their solutions.

Error 1: SendGrid SPF Record Not Found

Possible causes:

  • The SPF record was added to the wrong hostname.
  • The DNS record has not propagated.
  • The hostname contains an incorrect value.
  • The wrong authentication method was followed.

How to fix it:

First, check whether you enabled Automated Security or manual setup.

If you enabled Automated Security, verify the generated return-path CNAME.

If you selected manual setup, check the TXT record at the exact hostname SendGrid provided.

Do not search only for an SPF record at your root domain when SendGrid is using a separate return-path subdomain.

Error 2: Multiple SPF Records Found

A domain or subdomain should not publish multiple independent SPF policies at the same DNS hostname.

For example, this is incorrect:

v=spf1 include:sendgrid.net ~all
v=spf1 include:_spf.google.com ~all

Publishing multiple SPF records at the same hostname can result in an SPF PermError.

How to fix it:

Determine which services send email using that exact domain.

If multiple services need to be authorized at the same hostname, combine their valid mechanisms into one SPF record.

For example, a combined policy might look like:

v=spf1 include:_spf.google.com include:sendgrid.net ~all

This is only an illustrative example. Use it only if both services genuinely send using the same SPF-authenticated domain and the mechanisms are appropriate for your configuration.

If SendGrid uses a separate branded return-path subdomain, you may not need to add SendGrid to your root-domain SPF record.

Error 3: SPF Authentication Fails

An SPF failure can occur when the sending IP address is not authorized by the SPF policy for the envelope-sender domain.

Possible causes:

  • An incorrect SPF record.
  • An outdated manual SPF configuration.
  • A change in sending IP addresses.
  • A DNS record published at the wrong hostname.

How to fix it:

Check your SendGrid authentication settings.

If you use manual authentication, compare your published SPF record with the latest values provided by SendGrid.

If your account uses a dedicated IP, confirm that the required sending IP information is reflected in the configuration.

If Automated Security is enabled, investigate the generated CNAME and SendGrid's verification status rather than adding an unrelated TXT record.

Error 4: SendGrid Domain Authentication Is Not Verified

This problem usually means SendGrid cannot find one or more required DNS records.

How to fix it:

  1. Open your domain authentication settings.
  2. Review the generated DNS records.
  3. Compare each hostname and value with your DNS provider.
  4. Remove accidental duplicates or conflicting records where appropriate.
  5. Wait for DNS changes to propagate.
  6. Run verification again.

Error 5: SPF Passes but DMARC Fails

This can happen because SPF and DMARC evaluate different things.

SPF checks whether the sending IP is authorized for the envelope-sender domain.

DMARC additionally checks whether the authenticated domain aligns with the domain in the visible From address.

For example:

From: [email protected]
Return-Path: [email protected]

The domains differ.

Under relaxed SPF alignment, these domains can align because they share the same organizational domain. Under strict SPF alignment, they do not match exactly.

How to fix it:

Check your DMARC policy and alignment settings.

If you have configured strict SPF alignment (aspf=s), review whether your SendGrid return-path configuration meets that requirement. A custom return path may be necessary, depending on your sending setup.

Do not change your DMARC policy blindly. Understand the impact before modifying enforcement settings.

8. SPF, DKIM, and DMARC: What Is the Difference?

SPF is only one part of a complete email authentication setup.

Authentication methodMain purpose
SPFChecks whether the sending IP is authorized for the envelope-sender domain
DKIMVerifies a cryptographic signature associated with the message
DMARCChecks domain alignment and tells receiving servers how to handle authentication failures

Why Should You Configure All Three?

Each authentication method provides a different security function.

  • SPF helps identify unauthorized sending infrastructure.
  • DKIM helps verify message authenticity and integrity.
  • DMARC uses SPF and DKIM results together with domain alignment to apply an authentication policy.

For SendGrid users, completing domain authentication and monitoring actual message headers helps identify problems that a DNS lookup alone may not reveal.

You can use the LeadNurturix DKIM Checker and DMARC Checker to investigate the other authentication components. If you are building or reviewing a policy for several senders on the same hostname, the SPF Generator can help you assemble the mechanisms before publishing one record.

9. SendGrid SPF Best Practices

Follow these practices to maintain a reliable email authentication setup.

1. Use the DNS Records Generated by SendGrid

Avoid copying generic SPF values from unrelated tutorials.

SendGrid generates records based on your account settings and authentication method.

2. Avoid Multiple SPF Records

Publish only one SPF policy per DNS hostname.

If several services use the same envelope-sender domain, evaluate how to authorize them in one policy.

3. Understand Your Return-Path Domain

Do not assume that the root domain and SendGrid return-path subdomain use the same SPF record.

Check the actual return-path in your email headers.

4. Keep Your DNS Records Updated

If you change your SendGrid configuration, dedicated IP setup, or authentication method, review the DNS records that need updating.

5. Monitor SPF, DKIM, and DMARC Together

A complete email authentication setup requires more than an SPF pass.

Check all three authentication methods and investigate alignment problems.

6. Test Actual Emails

DNS records can appear correct while an email still fails authentication because of configuration or alignment issues.

Send test messages and inspect their authentication results.

10. Frequently Asked Questions

What is the correct SendGrid SPF record?

For manual domain authentication, SendGrid's documented example is:

v=spf1 include:sendgrid.net ~all

However, SendGrid also supports Automated Security, which uses a generated CNAME to manage SPF and DKIM authentication. Always use the records displayed in your account.

Does SendGrid require an SPF record?

SendGrid domain authentication requires the appropriate DNS configuration for SPF and DKIM. With Automated Security, SendGrid manages SPF through its generated CNAME configuration. With manual authentication, you add the generated SPF TXT record.

Can I add SendGrid to my existing SPF record?

Yes, if SendGrid genuinely sends using the same SPF-authenticated hostname as your other sending services and your configuration requires it.

However, SendGrid may use a separate return-path subdomain. In that situation, you should not automatically add include:sendgrid.net to your root-domain SPF record.

What is include:sendgrid.net?

It is an SPF mechanism used in SendGrid's documented manual authentication example:

v=spf1 include:sendgrid.net ~all

It authorizes the sending infrastructure specified by SendGrid's SPF policy for the hostname where the record is published.

Does SendGrid use TXT or CNAME records for SPF?

It depends on the authentication method.

Automated Security uses a CNAME-based configuration for SPF and DKIM management. Manual authentication uses an SPF TXT record along with other generated DNS records.

How long does SendGrid SPF verification take?

DNS propagation time varies by provider, caching, and record configuration. SendGrid notes that verification can take up to 48 hours in some cases.

If verification does not complete, compare the DNS records with the exact values displayed in your SendGrid account.

Can I use SendGrid with Google Workspace SPF?

Yes. You can use Google Workspace and SendGrid together.

However, you must understand which domain each service uses for SPF authentication. If both services use the same SPF hostname, their authorization mechanisms may need to be combined into one SPF policy. If SendGrid uses its own return-path subdomain, a separate root-domain entry may not be necessary.

Does SPF passing guarantee that SendGrid emails reach the inbox?

No. SPF passing confirms that the sending IP is authorized for the relevant envelope-sender domain.

Inbox placement also depends on sender reputation, DKIM, DMARC, recipient engagement, content quality, and receiving-provider filtering decisions.

Conclusion

Configuring a SendGrid SPF record correctly requires understanding how its domain authentication and return-path systems work.

If you use Automated Security, SendGrid can manage SPF and DKIM authentication through generated CNAME records. If you choose manual authentication, you must add the SPF TXT record and other DNS entries provided in your account.

The most important step is to follow your account-specific DNS instructions instead of blindly copying a generic SPF value. Verify the records, inspect actual email authentication results, and maintain SPF, DKIM, and DMARC together.

A correctly configured authentication setup gives receiving mail servers the information they need to evaluate your messages and helps protect your sending domain.

Official SendGrid Documentation

For account-specific DNS values and current setup instructions, consult SendGrid's own documentation:

These provider references are especially important because the records generated for your account depend on whether Automated Security is enabled.

Editorial Policy

LeadNurturix publishes educational content about email authentication, deliverability, DNS configuration, and B2B email infrastructure. Technical recommendations are reviewed against relevant provider documentation and established email authentication standards.

Content Transparency

DNS examples in this article are illustrative. SendGrid may generate different hostnames and values depending on your account, security settings, and authentication configuration. Always use the records shown in your SendGrid dashboard.

About the Author

Talha Rafi is an Email Deliverability Specialist and B2B Lead Generation professional with over five years of experience in cold email infrastructure, email authentication, domain configuration, and outbound email systems. Through LeadNurturix, he shares practical insights to help businesses improve their email setup and understand deliverability challenges.