Setting up domain authentication is a critical step when establishing your Twilio SendGrid account. This process is essential for ensuring the optimal deliverability of your emails. Domain Authentication not only enhances your email delivery rates but also boosts trustworthiness with both email inbox providers and your recipients.
This page provides insights into Twilio SendGrid's Domain Authentication process, focusing on domain setup and the verification of sending email servers' legitimacy through DNS entries. It's important to note that while this documentation discusses Twilio SendGrid here, the requirements and best practices for setting up domains and ensuring email deliverability are applicable to all reputable email delivery services.
This page guides you through Domain Authentication setup. Domain setup is a crucial step in sending affective email campaigns. If you're already familiar with Domain Name System (DNS) records, you may want to skip to the setup instructions.
If you're less familiar with DNS or email-specific DNS records, the following sections will help you understand why Domain Authentication is necessary and how it helps protect the reputation of your domain when sending email.
SendGrid added a Domain-based Message Authentication, Reporting & Conformance (DMARC) record on the DNS records page in the console. By following the steps below and adding this to the records hosted by your DNS provider, your organization will be able to meet the DMARC requirements set by Gmail and Yahoo!. These inbox providers may block email that does not contain a valid DMARC record.
When sending email, you must set Domain Name System (DNS) records on the domain to:
Domain Authentication, formerly known as Domain Whitelabel, is Twilio SendGrid's process for domain setup and setting the DNS entries that grant us permission to send email on your behalf. Once you have completed Domain Authentication by following the instructions on this page:
Having a high level understanding of the following terms will help as you learn more about email deliverability. However, you do not need to become an email deliverability expert to send email with Twilio SendGrid. If you wish to continue with Domain Authentication setup, skip ahead to the setup instructions.
As mentioned earlier, Domain Name System (DNS) records are essential to verifying which email servers are allowed to send email on behalf of your domain. DNS is a naming system for domains on the internet. It resolves domains humans can remember, like sendgrid.com
, to IP addresses that belong to specific computers.
There are several types of DNS records. An A record points a domain directly to an IP address where requested resources can be found. However, some records, such as CNAME records, link a domain to another domain or "host." Other records, such as TXT records, allow a domain owner to store text information about the domain. A single domain may have many records of varying types. For example, your domain may have an A record pointing to the IP address of your web server and CNAME records pointing to the cloud service that handles your email.
DNS records are managed using your DNS provider or host. Popular DNS providers include DNSimple, GoDaddy, Rackspace, and Cloudflare, but there are many others. These providers allow you to set and remove DNS entries for your domain.
When working with an email provider such as Twilio SendGrid, you should be aware of three types of email authentication: DomainKeys Identified Mail (DKIM), Sender Policy Framework (SPF) and Domain-based Message Authentication, Reporting & Conformance (DMARC). DKIM, SPF and DMARC are all implemented in part by setting records on your domain. DMARC is encouraged, but not a requirement for email authentication.
DomainKeys Identified Mail (DKIM) is an authentication method that uses asymmetric encryption to sign and verify your email. With DKIM implemented, the sending email server adds a cryptographic signature to your emails' headers. The DKIM record is a TXT record that stores the DKIM public key. For more information about how DKIM works, see DKIM Records Explained.
Sender Policy Framework (SPF) is an email authentication standard developed by AOL that allows you to list all the IP addresses that are authorized to send email on behalf of your domain. The SPF record is a TXT record that lists the IP addresses approved by the domain owner. The receiving server can compare the email sender's actual IP address to the list in the SPF record. For more information about how SPF works, see SPF Records Explained.
Domain-based Message Authentication, Reporting & Conformance (DMARC) is a protocol that verifies the authenticity of an email's sender. It helps prevent malicious senders from harming your sender reputation. DMARC provides a policy to email service providers, instructing them on the actions to take when they receive an email that fails SPF, DKIM, or both checks, and appears to be from your domain—a sign it may be spoofed.
DMARC is an optional field for Sender Authentication. SendGrid will check for an existing DMARC policy at your domain and display it if found. If no DMARC policy is identified, SendGrid will return a simple default policy of v=DMARC1; p=none
. For more information on DMARC, please refer to the article, Everything about DMARC.
During Domain Authentication setup, Twilio SendGrid's automated security will be enabled by default. If you leave automated security on, Twilio SendGrid will provide you with CNAME records that must be added to your domain. If you turn automated security off, you will be given one MX record and two TXT records instead.
As mentioned earlier, CNAME records link one domain to another domain. When Twilio SendGrid gives you CNAME records during Domain Authentication, they point to a domain Twilio SendGrid controls. This means that Twilio SendGrid can create and update your SPF and DKIM records for you. For example, if you purchase a dedicated IP address, Twilio SendGrid can add that address to your SPF automatically.
The CNAME record also allows Twilio SendGrid to route our click and open tracking statistics back to your Twilio SendGrid account where you can use them to adjust more sending behavior.
MX records specify the location of the server responsible for handling inbound email for a domain. When automated security is turned off, Twilio SendGrid will provide one MX record during Domain Authentication that must be added to your domain. This record enables the return-path.
The return-path is an email header, and it defines an address that is separate from your original sending address. The return-path address tells email servers where to send feedback such as delayed bounces and unsubscribes.
TXT records allow you to add text information about your domain. DKIM and SPF are both implemented using TXT records with specific formatting. With automated security turned off, Twilio SendGrid will provide these TXT records to be added to your domain.
When automated security is turned off, you must update the TXT records on your domain manually when you make a change to your email configuration. For example, when you add a new IP address to your account, your SPF TXT record will need to be updated with the new IP information to prevent email delivery issues.
If you choose to brand links during Domain Authentication, you will be given two additional CNAME records to support Link Branding. See our Link Branding documentation for more information.
Each user may have a maximum of 3,000 authenticated domains and 3,000 link brandings. This limit is at the user level, meaning each Subuser belonging to a parent account may have its own 3,000 authenticated domains and 3,000 link brandings.
To set up Domain Authentication, you must submit the DNS records provided by Twilio SendGrid to your DNS or hosting provider. Popular DNS providers include DNSimple, GoDaddy, Rackspace, and Cloudflare, but there are many others.
If you already have a DNS record with a custom name on your domain, adding a new record with a matching custom name will overwrite your existing DNS entry. This can happen if you Use a custom return-path and set the name to one that already exists in your DNS entries.
For example, let's assume you have a TXT record with the host email.example.com
. If you set a custom return-path of email
during Domain Authentication, Twilio SendGrid will create a record with the host email.example.com
. When you complete automatic Domain Authentication, your existing TXT record will be replaced with Twilio SendGrid's record. This will likely break one of your existing services.
Be sure you are not completing Domain Authentication by using any custom names that already exist for records on your domain before proceeding.
Twilio SendGrid supports Domain Connect, which can simplify the Domain Authentication process.If we have partnered with your DNS provider to support Domain Connect, you will have the option to authenticate with your DNS provider and allow Twilio SendGrid to configure the DNS changes for you. Both automatic and manual setup begin the same way with the "Setup steps required for both automatic and manual setup" that follow.
Link Branding is not currently supported by the automatic setup process. If you choose to brand links during Domain Authentication, you must add the Link Branding CNAME records to your domain manually.
orders@example.com
, you will authenticate example.com
. Make sure that you enter only your root domain <domain-name.top-level-domain>
. Do not include a subdomain or protocol such as www
or http://www
in this field.Automated setup is currently available for GoDaddy only. We plan to add support for additional DNS providers in the future.
If you already have a DNS record with a custom name on your domain, adding a new record with a matching custom name will overwrite your existing DNS entry. This can happen if you Use a custom return-path and set the name to one that already exists in your DNS entries.
For example, let's assume you have a TXT record with the host email.example.com
. If you set a custom return-path of email
during Domain Authentication, Twilio SendGrid will create a record with the host email.example.com
. When you complete automatic Domain Authentication, your existing TXT record will be replaced with Twilio SendGrid's record. This will likely break one of your existing services.
Be sure you are not completing Domain Authentication by using any custom names that already exist for records on your domain before proceeding.
GoDaddy, Amazon Route 53, and Namecheap, among other providers, automatically append your domain to your new DNS record values, resulting in a CNAME entry that fails verification. For example, if your domain is example.com
, and Twilio SendGrid's CNAME host value is em123.example.com
, the incorrect record will become em123.example.com.example.com
.
You can remedy this by pasting only the subdomain section of the host value, em123
, into your DNS provider's host field. You do not need to modify the value of the record. Be sure to check your CNAME for this behavior if your domain doesn't validate initially.
It can take up to 48 hours for the records to verify after you upload them into your DNS host, so you will likely have to come back later to verify.
During Domain Authentication setup, on the second Authenticate Your Domain page where you enter your domain, there is a drop-down menu labeled Advanced Settings. The following section explains each of these settings.
Automated security is different from automatic setup. Automated security allows Twilio SendGrid to handle the signing of your DKIM and the authentication of your SPF with CNAME records. This allows you to add a dedicated IP address or update your account without having to update your DNS records. For more information about how this works, see the "Twilio SendGrid's DNS records" section of this page.
Automated security defaults to On. If your DNS provider does not accept underscores in CNAME records, you will have to turn automated security off and use MX and TXT records.
If you turn off automated security, you are responsible for managing and updating the MX and TXT records yourself.
You can use a custom return-path to customize the subdomain that tells receiving email servers where to route delayed bounces and unsubscribes.
You can set a custom DKIM selector if you want to authenticate a single domain multiple times or if Twilio SendGrid's DKIM selector, s
, is already in use by another service. This works by adding the custom selector to the domain as a custom subdomain.
org
or 001
.When you authenticate a domain on a parent account, you can assign it to a Subuser. The Subuser will not see the authenticated domain assigned by the parent. This is intentional and prevents a Subuser from editing or deleting an authenticated domain from the parent or any other assigned Subusers.
The parent account owns the DNS records used to authenticate the domain and then grants the Subuser permission to use the authenticated domain. Authentication records are mapped to the account that creates them.
You can modify a Subuser's Domain Authentication assignments in the Subuser Management section of the Twilio SendGrid App. See our Subusers documentation for more about Subusers.
Twilio SendGrid has partnered with the following DNS providers who support Domain Connect to automate the Domain Authentication process.
If you authenticated a domain (Whitelabel) before 2015, your domain will still work. However, if you need to change or update it, you need to delete it and recreate it as an authenticated domain in our new system.