example: "v=DKIM1; t=s; p=LDHFOlsd+ZI" "KJHLLL" As you can see when using dig command " sign creates extra space between "" sign
The space is not actually part of the value. (And neither are the quotation marks – they're just delimiters printed by dig
.)
The value of a TXT record consists of one or more discrete strings; each quoted item in a zone file creates a separate string in DNS, and the output of dig
uses the same format, representing each item as a quoted string.
(You can imagine it as a two-element array: [ "v=DKIM1; p=blah", "blahblah" ]
. Language A might use commas and double-quotes to denote an array of strings, language B might use spaces and single-quotes, but the values remain the same either way.)
The individual strings within a record are of limited length (up to 255 bytes?) so a DKIM RSA key will usually span at least two, no matter what you do.
Handling of a TXT record that contains multiple strings needs to be specified as part of each protocol that uses such TXT records. In the case of DKIM, the specification requires that all strings within a record will be concatenated without any separator. (This will be done by the DKIM validator software – not by you.)
So the result you're seeing is okay – your TXT record has two pieces, which every compliant DKIM validator will join together without a separator.