dnscontrol: The content field of TXT records must be in quotation marks, but is not?
Describe the bug
Cloudflare is complaining about TXT entries (including those from SPF_BUILDER and DMARC_BUILDER entries):
The content field of TXT records must be in quotation marks. Cloudflare may add quotation marks on your behalf, which will not affect how the record works.
To Reproduce Steps to reproduce the behavior:
- Use Cloudflare as DNS provider
- Use a DNSControl configuration file with
TXTentries - Push your changes
- See error in Cloudflare dashboard (click on red triangle with exclamation mark inside)
Expected behavior No warnings/errors in Cloudflare dashboard
DNS Provider
- Cloudflare
Additional context N/A
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (8 by maintainers)
Use
TXT("@", "test").The
TXT(label, data)function expectsdatato be a JSON-encoded string. The resulting string will be used to create a TXT record that displays that exact string. That string (according to rfc6376) does not begin and end with double-quotes. Therefore, you shouldn’t add them.While I’m otherwise a fan of Cloudflare, I feel they get this wrong. This warning is inappropriate if the record was updated via the API, such as when using DNSControl. According to https://github.com/StackExchange/dnscontrol/issues/3172#issuecomment-2469452565, they are considering changing their UI.
I think they’ve confused the RFC 1035 file format and the wire-format of the txt record.
Let me get some popcorn. This is going to be fun to watch.
Originally posted (13 jun.) by @janik-cloudflare in Cloudflare community: Importing TXT records adds quotes, breaking records (comment)
Originally posted (11 sep.) by @janik-cloudflare in Cloudflare community: Warning for TXT records without double quotes (comment)
On the other hand, they are pretty explicit about the quotation marks in their help pages about TXT records: