Symptoms

Attempting to modify a DNS Zone with the addzonerecord WHMAPI function with URL-encoded txtdata that exceeds 255 characters and including the beginning and end quotation marks will result in all of the domain's DNS being removed from the zone file. The API returns that the function was successful in making the change, and no other errors are noted.

 

Description

A TXT Record was a limit of 255 characters, and anything above cPanel will automatically split into valid entries for the domain. However, it appears this process silently fails when a URL-encoded TXT Record is passed via the HTTP Request method that includes the beginning and end quotation marks. As cPanel recreates the zone file in full during this process, it results in no DNS being written to the file.

We've opened an internal case for our development team to investigate this further. For reference, the case number is CPANEL-50700. Follow this article to receive an email notification when a solution is published in the product. 

 

Workaround

First, any domains impacted by this will need to be restored from a backup, or have their zone files "Reset". The following provides information on these topics.

Restore an account from a backup file on the server

How to reset a DNS zone file

Once the zone file is valid again, the value for the TXT Record will need to be re-encoded without the beginning and end quotation marks. The API handles these requests as expected.