Publish a long TXT value without adding unintended quotes or spaces

A DNS TXT record can contain more than one character-string. Long DKIM keys and other provider values may be displayed as several quoted chunks even though the application treats them as one logical value. Preserve the exact content and the protocol's joining rules.

Check access and requirements

Copy the value from the provider's authenticated setup page and identify its record name and purpose. Record any existing TXT records at that name. A DNS name can legitimately have several unrelated TXT records, but separate TXT records are not the same as chunks inside one record.

01 Publish a long TXT value without adding unintended quotes or spaces

  1. Check the DNS editor's instructions for long values. Many interfaces accept one long value and split it into DNS character-strings automatically.
  2. Avoid copying decorative quotation marks, line numbers or wrapped email formatting into the value. A displayed quote may be presentation syntax rather than a literal character to store.
  3. Where manual chunking is required, keep each DNS character-string within its 255-octet limit and follow the provider's format. Do not introduce a space at a chunk boundary unless the original logical value contains one.
  4. Save one intended logical record. For SPF, do not create several separate v=spf1 records at the same owner name as a way to split a long policy.
  5. Query the record and compare the reconstructed value using the consuming protocol's rules. DKIM and SPF combine the strings within a record without adding separators.

02 Example: understand how quoted TXT chunks form one value

In BIND zone-file notation, one TXT record can contain multiple quoted character strings. This short artificial example demonstrates joining, not a real verification or mail-authentication token. Follow your DNS provider's editor format when entering a long value.

Code or configuration example
_verify.example.com.  300  IN  TXT  "verification=abc" "def123"

dig _verify.example.com TXT +noall +answer

Read the result: The two strings represent the continuous value verification=abcdef123 for a protocol that concatenates them. No extra space is inserted between the chunks. Adding a space inside a quoted string changes the content. Separate TXT records are not automatically equivalent to chunks within one record.

Many web editors split long values automatically and expect the raw token without zone-file quotation marks. Compare the retrieved content with the provider's original value character for character. Preserve unrelated TXT records and avoid pasting a long value through software that replaces straight quotes with decorative quotes.

Confirm the expected result

Run the provider's domain verification or authentication test after the authoritative answer is correct. For DKIM, inspect a newly sent message and verify its signing result rather than relying only on the DNS editor.

Resolve setup problems

If verification fails, compare exact prefixes, key data, selector name and punctuation. A duplicated zone suffix or inserted newline can be more important than the visual appearance of separate quoted chunks.

A common question

Does seeing two quoted strings in dig mean I accidentally created two TXT records?

Not necessarily. Multiple strings on the same resource-record answer can be one TXT record. Separate answer records are distinct entries. Inspect the structure and the consuming service's expected value before deleting either.

  • 0 Users Found This Useful
  • domains-dns
Was this answer helpful?

Related Articles

Diagnose a website that fails only over IPv6 after an AAAA change

An incorrect AAAA record can send IPv6-capable visitors to an unavailable server while IPv4...

Delegate certificate DNS validation without exposing the main zone credential

DNS-01 certificate validation proves control through a TXT record at an _acme-challenge name. A...

Point an apex domain at a hosted service without an invalid CNAME

The apex is the domain itself, such as example.com. An ordinary CNAME cannot coexist there with...

Use CAA records to authorise the certificate authorities your services need

CAA records let a domain operator express which certificate authorities may issue certificates...

Delegate a subdomain to another authoritative DNS provider

Delegating a subdomain lets another DNS service manage a branch such as shop.example.com while...