ReplyDak

How to add SPF, DKIM and DMARC records in Amazon Route 53

Updated 10 November 2026 · 5 min read

Short answer

In Route 53 open Hosted zones → your domain → Create record, choose TXT, set the Record name (blank for the root, _dmarc, or selector._domainkey) and enter the value in double quotes. A single string can hold 255 characters, so a 2048-bit DKIM key must be entered as two or more quoted strings on one line, like "v=DKIM1; k=rsa; p=MIIB…" "…IDAQAB". Don't use Route 53's SPF record type; AWS and RFC 7208 say to publish SPF as TXT.

Route 53 formats for email records

RecordTypeRecord nameValue (console)
SPFTXT(blank)"v=spf1 include:_spf.google.com ~all"
DKIMTXTgoogle._domainkey"v=DKIM1; k=rsa; p=MIIBIjAN…(first 255)" "…(rest)"
DMARCTXT_dmarc"v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com"
MXMX(blank)1 smtp.google.com

The 255-character rule

AWS's record-type reference says a single TXT string can include up to 255 characters; for longer values, break the value into strings of 255 or fewer and put each in double quotes, all on the same line. The whole value can be up to 4,000 characters. Receivers join the strings with no space between them, so split anywhere inside the key, but don't add or drop characters. If you paste a long key without splitting, Route 53 rejects it with a CharacterStringTooLong error.

Several TXT values on one name

With simple routing, every TXT value for a name lives in the same record set: one value per line. So the root TXT record can hold the SPF string and a Google verification string on separate lines. That is fine. Two separate lines that both start with v=spf1 are not: that is two SPF records and SPF fails with a permerror.

Step by step

  1. 1

    Open the hosted zone

    Route 53 console → Hosted zones → the public zone for your domain. Make sure the registrar's nameservers match the zone's NS record.

  2. 2

    Edit the root TXT record

    If a TXT record for the root exists, edit it and add the SPF line; otherwise create one with a blank name.

  3. 3

    Create the DKIM record

    Split the key into quoted chunks of up to 255 characters on one line.

  4. 4

    Create DMARC

    Record name _dmarc, quoted value.

  5. 5

    Let SES publish its own

    If the zone is in the same AWS account as Amazon SES, SES can create its DKIM and MAIL FROM records for you.

Check the result

If DKIM shows as missing, look for an extra space between the split strings inside a quote. Run the domain through the free ReplyDak deliverability check: it reads MX, SPF, DKIM and DMARC live from public DNS, counts SPF lookups and checks the main blocklists, with no sign-up. If your DKIM selector is not a common one, type it into the optional selector box.

More setups and errors: SPF, DKIM and DMARC by provider, DNS host and error.

FAQ

Do Route 53 TXT values need quotes?

Yes. Each string is entered in double quotes; long values are several quoted strings on one line.

Should I use the SPF record type in Route 53?

No. AWS no longer recommends it, and RFC 7208 says SPF must be published as TXT.

How do I enter a 2048-bit DKIM key in Route 53?

Split it into strings of at most 255 characters, each in quotes, separated by a space, on one line.

Sources

Related

Microsoft 365 mailboxes are coming soon. Until then, new orders use Google Workspace mailboxes.