DKIM Record Formatter Google Cloud DNS • RFC 1035

Google Cloud DNS DKIM Record Splitter

Copy-paste your 2048-bit DKIM value and domain name below to get the exact 255-character split strings required by Google Cloud DNS and Google Workspace.

1. Enter Domain & Raw DKIM Value

Format: yourcompany.com
❌ Enter a valid domain name such as yourcompany.com.
Default: google._domainkey
Paste the full v=DKIM1; k=rsa; p=MIIBIjANBg... string from Google Admin Console
❌ Paste a valid DKIM record string (starting with v=DKIM1; or p=...).
0 characters Waiting for DKIM key
Key Length
—
Algorithm
—
DNS Strings
—

2. Copy Into Your DNS Manager

DNS Record Name (Host)
google._domainkey
Type: TXT TTL: 300
TXT Data (Single Field, Space-Separated Quotes)
Paste your DKIM record on the left to split and format it automatically...

How to Add a 2048-bit DKIM Record to Google Cloud DNS

When you generate a 2048-bit DKIM key in Google Workspace (Gmail) or providers like SendGrid, Postmark, and Mailgun, the value is ~410 characters long. Pasting it directly into Google Cloud DNS fails with:

Google Cloud DNS Error
Invalid value for 'TXT data': Value too long (longer than 255 characters)
1
Generate Key in Google Admin
Open Google Admin → Apps → Google Workspace → Gmail → Authenticate email, and copy the 2048-bit TXT record value.
2
Split Into Two Quoted Strings
Enter your domain and paste the raw DKIM key above. It splits at 255 characters into two space-separated quoted strings.
3
Paste Into Single TXT Field
In Cloud DNS, click Add Standard, choose TXT, and paste the output into the single TXT data 1 input box.

Verify Your DKIM Record in DNS

After saving the record in Google Cloud DNS, run this terminal command to confirm both strings resolve properly before clicking Start Authentication in Google Workspace:

Terminal Verification Command
dig TXT google._domainkey.yourdomain.com +short

Why Does Google Cloud DNS Have a 255-Character TXT Limit?

Under RFC 1035 (Section 3.3.14), DNS TXT records store text as one or more length-prefixed character strings. Because the length byte is an unsigned 8-bit integer, no single string in a DNS packet can exceed 255 bytes (255 characters).

A 2048-bit RSA public key encoded in Base64 (v=DKIM1;k=rsa;p=MIIBIjANBg...) is 408 to 450 characters long. To fit inside a single DNS TXT resource record, it must be split into multiple contiguous quoted strings ("string_1" "string_2"). Receiving mail servers automatically concatenate those strings with no spaces when validating your email signature per RFC 6376.

Frequently Asked Questions

Should I click "Add item" in Google Cloud DNS for the second string?

No. In Google Cloud DNS, clicking "Add item" creates two separate TXT records in the record set, and DNS resolvers may return them in arbitrary order. Instead, paste both double-quoted strings ("first 255 chars" "remaining chars") separated by a single space into the single TXT data 1 field.

What DNS name should I use for Google Workspace DKIM?

By default, Google Workspace uses the selector google, so the DNS record name is google._domainkey.yourdomain.com. (in Cloud DNS, simply type google._domainkey in the DNS name prefix box).

Does splitting the DKIM key at 255 characters break RSA key verification?

No. RFC 6376 Section 3.6.2.2 mandates that DKIM verifiers join all contiguous character-strings in a TXT record without adding spaces before parsing the p= public key tag.

Does this also work for AWS Route 53, Cloudflare, DigitalOcean, and BIND?

Yes. AWS Route 53, Azure DNS, DigitalOcean DNS, and standard BIND zone files use the exact same "chunk1" "chunk2" RFC 1035 syntax for TXT strings over 255 characters.