In short. At SendGrid, SPF and DKIM are set up with domain authentication (Settings, Sender Authentication): SendGrid generates the DNS records to publish and you click Verify. DMARC is a _dmarc TXT record on your sending domain. With automated security (on by default), SPF and DKIM use CNAME records; without it, you publish MX and TXT records and keep them up to date.
SPF lists the servers allowed to send, DKIM signs every message, and DMARC tells recipients what to do with messages that fail. SendGrid documents these settings in the Twilio documentation.
Last verified: November 30, 2026, against the official Twilio SendGrid documentation.
Before you start
You need access to your domain's DNS. SendGrid states that subdomains do not inherit authentication from the parent domain: authenticate each sending domain. Each user and subuser can have up to 3,000 authenticated domains.
1. SPF and DKIM: domain authentication
In SendGrid, open Settings > Sender Authentication, then Get Started in the Domain Authentication section. On Authenticate Your Domain, choose your DNS host (or I'm not sure, or Other Host (Not Listed)), then say whether you also want to brand your links. In Domain You Send From, enter only your root domain, with no subdomain or www. Under Advanced Settings, choose your options, then Next to open Install DNS Records.
The documented options: Use automated security (on by default), Use a custom return path (replaces the random four-character subdomain with a label of your choice), Use a custom link subdomain, Use a custom DKIM selector (three letters or numbers different from the original, such as org or 001, useful to authenticate a domain several times), Make domain EU-pinned and Auto provision SSL Certificate.
Automated security on: SendGrid manages DKIM signing and SPF authentication through CNAME records. The documentation's example (example.com):
CNAME em[0000].example.com -> [u00000000].[wl000].sendgrid.net
CNAME s1._domainkey.example.com -> s1.domainkey.[u00000000].[wl000].sendgrid.net
CNAME s2._domainkey.example.com -> s2.domainkey.[u00000000].[wl000].sendgrid.net
TXT _dmarc.example.com v=DMARC1; p=none;Automated security off (do this if your DNS provider rejects underscores in CNAME records):
MX em[0000].example.com mx.sendgrid.net.
TXT em[0000].example.com v=spf1 include:sendgrid.net ~all
TXT m1._domainkey.example.com k=rsa; t=s; p=MIG...
TXT _dmarc.example.com v=DMARC1; p=none;The numbers in brackets are the ones SendGrid shows for your account: copy the values from your console. Without automated security, you must update the SPF record when your sending setup changes, for example when you add an IP address. Add the records at your DNS provider, go back to SendGrid and click Verify; propagation can take up to 48 hours.
2. DMARC
SendGrid says to add DMARC as a DNS TXT record on the domain that sends email. The value must start with v=DMARC1;, follow the RFC 1035 (3.3.14) format and not exceed 512 bytes. The documentation's template:
v=DMARC1;
p=(none|quarantine|reject);
rua=mailto:<email address>Publish it at _dmarc.example.com. The policies: p=none (the message is delivered; SendGrid advises none to collect reports), p=quarantine (spam folder, recoverable) and p=reject (message deleted, bounced to the envelope-from address, or both). The pct tag requires quarantine or reject.
For alignment, strict mode (s) only accepts return-path domains that exactly match the domain in the SPF or DKIM record; relaxed mode (r) accepts domains that match the parent domain. SendGrid notes that relaxed mode lets CNAME addresses pass: @mail.example.com passes against @example.com in relaxed mode, not in strict mode.
Then tighten DMARC step by step
Start with p=none to read the reports before enforcing quarantine or reject. Without DMARC, a sender cannot tell what happens to a failed message. Mailbox providers that enforce DMARC may reject a message with a 521 5.2.1 error; SendGrid records it as a Block and advises adjusting your From address settings, then resending.
Common mistakes
- Doubled hostname: some providers append your domain to CNAME values, and
em123.example.combecomesem123.example.com.example.com, which fails. Enter only the hostname, for exampleem123. - GoDaddy verification fails: close the window, click Verify again after 48 hours, then contact support if nothing changes.
- Underscore refused in a CNAME: turn off automated security and publish the MX and TXT records yourself.
- Unauthenticated subdomain: it does not inherit from the parent domain.
- Duplicate custom CNAME: a return path or link subdomain identical to an existing CNAME overwrites the old one and can break DNS resolution. Check your CNAME records first.
- Domains authenticated before 2015: they cannot be changed; delete and recreate them.
- Partly verified records: wait; a mistyped record is also possible.
Check that it works
Once SendGrid shows the domain as verified, check it yourself (replace <emXXXX> with the host shown in your console):
dig CNAME s1._domainkey.example.com
dig CNAME <emXXXX>.example.com
dig TXT _dmarc.example.com
nslookup -type=CNAME s1._domainkey.example.com
nslookup -type=TXT _dmarc.example.comYou should see the console values and one line starting with v=DMARC1. Our free tools read SPF, DKIM and DMARC.
Free tool. DMARC checker · SPF checker · DKIM checker
Check your domain for free. AttackScout reads your public SPF, DKIM and DMARC records and tells you what to change. The public audit is free, no account needed; paid monitoring costs €9.99 excl. VAT per month or €99 excl. VAT per year per domain (daily audit, alerts from Medium severity). Run the free check · Pricing
Frequently asked questions
SendGrid: what is automated security?
An option that is on by default: SendGrid manages DKIM signing and SPF authentication through CNAME records. Turn it off if your DNS rejects underscores in CNAME records.
SendGrid: which records do I publish without automated security?
An MX and an SPF TXT at em[0000], a DKIM TXT at m1._domainkey and a _dmarc TXT, with the values from your console, to be updated if your sending setup changes.
SendGrid: how long does domain verification take?
DNS changes can take up to 48 hours. If only some records verify, wait.
SendGrid: why is a subdomain not authenticated?
Subdomains do not inherit authentication from the parent domain; authenticate each one.
Related pages
Sources
Read on 11/30/2026.
- Twilio SendGrid, Configure domain authentication: https://www.twilio.com/docs/sendgrid/ui/account-and-settings/how-to-set-up-domain-authentication
- Twilio SendGrid, Enforce authentication with a DMARC policy: https://www.twilio.com/docs/sendgrid/ui/sending-email/dmarc