When querying DKIM records using dig, you may see a backslash character before a semicolon, displayed as “\;”.
This behavior is not an error in the DNS record and does not indicate a problem with DKIM configuration.
It is a display behavior in dig that has existed since early releases of BIND.
Why This Happens
In DNS, the semicolon character is treated as the start of a comment.
When dig outputs TXT record data that contains a literal semicolon, it escapes the character using a backslash to indicate that the semicolon is part of the record value and not a comment.
The backslash is an escape character used by dig to represent the semicolon correctly in its output.
This Is Not a DKIM Issue
The presence of “\;” in dig output does not affect DKIM validation or email delivery.
The underlying TXT record stored in DNS is correct, and mail servers interpret the DKIM record as intended.
This output format is consistent with how standard BIND-based DNS servers display TXT records.
How to Verify DKIM Records
You can query any DKIM TXT record on a BIND-based DNS server and observe the same escaped output.
For example:
dig selector._domainkey.example.com TXT
The presence of the backslash does not need to be corrected or removed.
When to Take Action
No action is required when you see “\;” in dig output. This is expected behavior and does not indicate a misconfiguration.
Only investigate further if DKIM validation is failing or mail servers report signature errors, which would be unrelated to this display behavior.