Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Configure domain authentication


When configuring your Twilio SendGrid account, set up domain authentication. Domain authentication verifies the legitimacy of your email servers, messages, and sending addresses. To configure authentication, you add specific Domain Name System (DNS) resource records to your domain.

After you add these DNS records on your domain, these records make the following assertions on behalf of your domain:

  1. You own the domain that sent the email message.
  2. You permitted the sending email server to send email on behalf of the domain.
  3. You verified the identity of the email sender.
  4. You validated that no one tampered with the email message in transit.

DNS resource records that Twilio SendGrid generates

dns-resource-records-that-twilio-sendgrid-generates page anchor

To configure your domain to support authentication, Twilio SendGrid generates four DNS resource records. The records generated depend upon your automated security setting. Twilio SendGrid turns on automated security by default.

Automated security ONAutomated security OFF

If your DNS provider doesn't accept underscores in CNAME records, you can't use Automated Security.

If you turned on Use automated security, the first step on the Install DNS Records page displays four DNS resource records.

  • One CNAME record that points mail from your branded URL to the Twilio SendGrid email service and supports SPF and DKIM.
    • Twilio SendGrid can create and update your SPF and DKIM records on your behalf.
    • Example: If you purchase a dedicated IP address, Twilio SendGrid adds that IP address to your SPF record to your domain.
  • Two CNAME records that point servers that support link branding.
    • To route click and open tracking statistics to your Twilio SendGrid account, Twilio SendGrid requires this CNAME record.
  • One TXT record that provides the DMARC record.

Set up domain authentication

set-up-domain-authentication page anchor

Twilio SendGrid integrates domain authentication into its domain setup procedure. Domain authentication offers the following benefits:

  • It removes tagline via sendgrid.net (or via eu.sendgrid.net for Regional customers) after the from address in your email messages.
  • It improves the trust in the legitimacy of your messages for both receiving email servers and human recipients. This improves your chance of reaching an inbox instead of a spam folder.
(information)

User limits for authenticated domains and link brandings

Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. The limit applies to each individual user and subuser: each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings.

Complete the prerequisites

complete-the-prerequisites page anchor

Domain authentication requires changes to your DNS records. Complete the following activities before continuing with this tutorial:

Choose your setup option

choose-your-setup-option page anchor

Twilio offers three options for domain authentication from the Sender Authentication(link takes you to an external page) page:

Automated SetupManual SetupSend To A Coworker

Have Twilio SendGrid configure it for you. Twilio SendGrid supports Domain Connect(link takes you to an external page) with GoDaddy(link takes you to an external page). Before starting this procedure, log in to your GoDaddy account and permit Twilio SendGrid to configure your DNS changes.

(information)

Conditions for automated setup

Twilio SendGrid only supports automated setup under three conditions:

  1. GoDaddy hosts the domains.
  2. You left automated security turned on.
  3. You're not using Link Branding.
  1. In the Twilio SendGrid console, select Settings > Sender Authentication(link takes you to an external page).

  2. In the Domain Authentication section, click Get Started. The Authenticate Your Domain page appears.

  3. From the Authenticate Your Domain page, select your DNS host from the Which Domain Name Server (DNS) host do you use? dropdown. You can select I'm not sure or Other Host (Not Listed) if necessary.

  4. To use branded links, toggle Would you also like to brand the links for this domain? to Yes.

    If you choose No, you can add Link Branding later.

    To learn more about link branding, see How to Set up Link Branding.

  5. Click Next.

  6. In the Domain You Send From box, type the domain you want to authenticate.

    • This domain would appear in the from address of your messages.
    • Type only your root domain <domain-name.top-level-domain>.
    • Omit any subdomains or protocols like www or http://www.

    For example: To send messages from addresses like orders@example.com, type example.com.

  7. Click Advanced Settings.

    1. Check Use automated security.
      • Leave Use automated security checked.
      • When checked, Twilio SendGrid handles the signing of your DKIM and the authentication of your SPF with CNAME records.
    2. If you want to override the return path, check Use custom return path.
      • This return-path informs receiving email servers where to route delayed bounces and unsubscribes.
      • The Return Path box appears.
      • Type a custom domain into the Return Path box.
    3. If another service uses a DKIM selector of s, check Use a custom DKIM selector.
      • The DKIM Selector box appears.
      • Type a set of three characters in this box.
    4. If you need to limit your domain to the European Union, check Make domain EU-pinned.
      • Regional email users must pin their domain to the EU region.
  8. Select the Advanced Settings appropriate for your needs.

  9. Click Next. The Install DNS Records page appears.

  10. If Twilio SendGrid can finish the Domain Authentication process, the Automatic Setup tab appears.

    • If not, the Manual Setup tab appears.
  1. From the Automated Setup tab, click Connect.
  2. A modal titled Connect GoDaddy to Twilio SendGrid for this domain appears.
  3. Log in to your GoDaddy account and connect to your domain.
  4. Twilio SendGrid tries to verify your DNS records.
    • If GoDaddy verification succeeds, the modal closes. The Twilio SendGrid console displays a success message.
    • If GoDaddy verification fails, close this modal.
(warning)

Validation error when DNS provider generates incorrect DNS records

Major DNS providers like GoDaddy, Amazon Route 53, and Namecheap append your domain to any DNS records you add. Consider this scenario:

  1. Twilio SendGrid gives you a CNAME value of em123.example.com.
  2. You enter this value as a CNAME value in your DNS provider.
  3. The provider appends your domain, example.com, to your CNAME value.
  4. The provider stores a DNS CNAME record of em123.example.com.example.com.

This CNAME entry fails verification.

If you see this incorrect CNAME value, type only the hostname value into your DNS provider CNAME field. In this example, the host value is em123. The DNS provider should store this as a DNS CNAME record of em123.example.com.


During domain authentication setup, the second Authenticate Your Domain page includes a dropdown menu labeled Advanced Settings. The following section explains each of these settings.

Automated security differs from automatic setup.

Automated security defaults to On.

If your DNS provider doesn't accept underscores in CNAME records, turn off Automated Security.

  • When turned on, automated security provides the following features:
    • Twilio SendGrid can manage the signing of your DKIM and the authentication of your SPF with CNAME records.
    • You can add a dedicated IP address or update your account updating your DNS records.
  • When turned off, you accept responsibility for the following tasks:
    • Adding the generated MX and TXT records.
    • Making any changes to these records when needed.

To learn more about how this works, see Twilio SendGrid DNS records.

Use a custom return path

use-a-custom-return-path page anchor

When you configure domain authentication, Twilio SendGrid creates a subdomain for your domain to handle bounce and unsubscribe notices. This subdomain consists of four random alphanumeric characters. Receiving email servers then send bounce and unsubscribe notices to an email address with that subdomain and your domain.

If you require a specific label for this subdomain, build a custom return-path:

  1. Select Use a custom return path.
  2. Type alphanumeric characters for your preferred subdomain.

The Install DNS Records page displays your chosen subdomain as a CNAME record pointing to sendgrid.net.

(warning)

Don't overwrite existing DNS records

If your custom return path CNAME record matches an existing DNS CNAME record, your added record overwrites the existing record. This impacts existing DNS resolution. Before adding CNAME records, check the existing DNS CNAME records on your domain.

Use a custom DKIM selector

use-a-custom-dkim-selector page anchor

You might set a custom DKIM selector for one of two reasons:

  1. You want to authenticate a single domain multiple times.
  2. Another service uses the Twilio SendGrid DKIM selector, s.

To set a custom DKIM selector, add the custom selector to the domain as a custom subdomain.

  1. Select Use a custom DKIM selector.
  2. Type three letters or numbers that create a custom subdomain.
    • If you don't provide your own subdomain, Twilio SendGrid creates one for you.
    • Type three characters different from your original selection. For example: you could use org or 001.

Migrate from legacy domain authentication

migrate-from-legacy-domain-authentication page anchor

You can't change any domains authenticated before 2015. To change such a domain, delete it, then recreate it as an authenticated domain.