diff --git a/interface/lib/classes/db_mysql.inc.php b/interface/lib/classes/db_mysql.inc.php
index 9a7cf7129f9daec35a6714d74e495974dba6aa29..2e893e850867b0e86ae5b88f1e23450e5dfca7be 100644
--- a/interface/lib/classes/db_mysql.inc.php
+++ b/interface/lib/classes/db_mysql.inc.php
@@ -686,7 +686,7 @@ class db
 	}
 
 	//** Function to fill the datalog with a full differential record.
-	public function datalogSave($db_table, $action, $primary_field, $primary_id, $record_old, $record_new, $force_update = false) {
+	public function datalogSave($db_table, $action, $primary_field, $primary_id, $record_old, $record_new, $force_update = false, $options = []) {
 		global $app;
 
 		// Insert backticks only for incomplete table names.
@@ -712,6 +712,7 @@ class db
 		$server_id = (isset($record_old['server_id']) && $record_old['server_id'] > 0)?$record_old['server_id']:0;
 		if(isset($record_new['server_id'])) $server_id = $record_new['server_id'];
 
+		$diffrec_full['options'] = $options;
 
 		if($diff_num > 0) {
 			$diffstr = serialize($diffrec_full);
@@ -810,7 +811,7 @@ class db
 	}
 
 	//** Deletes a record and saves the changes into the datalog
-	public function datalogDelete($tablename, $index_field, $index_value) {
+	public function datalogDelete($tablename, $index_field, $index_value, $options = []) {
 		global $app;
 
 		// Check fields
@@ -820,7 +821,7 @@ class db
 		$old_rec = $this->queryOneRecord("SELECT * FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value);
 		$this->query("DELETE FROM ?? WHERE ?? = ?", $tablename, $index_field, $index_value);
 		$new_rec = array();
-		$this->datalogSave($tablename, 'DELETE', $index_field, $index_value, $old_rec, $new_rec);
+		$this->datalogSave($tablename, 'DELETE', $index_field, $index_value, $old_rec, $new_rec, FALSE, $options);
 
 		return true;
 	}
diff --git a/interface/web/dns/dns_soa_del.php b/interface/web/dns/dns_soa_del.php
index fee2138f8579708ed7f6085daef93710c36ea438..2d18a2d4ff09c813a03d4bef124b2be247d23652 100644
--- a/interface/web/dns/dns_soa_del.php
+++ b/interface/web/dns/dns_soa_del.php
@@ -55,10 +55,11 @@ class page_action extends tform_actions {
 
 		if($app->tform->checkPerm($this->id, 'd') == false) $app->error($app->lng('error_no_delete_permission'));
 
-		// Delete all records that belog to this zone.
+		// Delete all records that belong to this zone.
 		$records = $app->db->queryAllRecords("SELECT id FROM dns_rr WHERE zone = ?", $this->id);
+		$options = ['deleting_dns_soa' => TRUE];
 		foreach($records as $rec) {
-			$app->db->datalogDelete('dns_rr', 'id', $rec['id']);
+			$app->db->datalogDelete('dns_rr', 'id', $rec['id'], $options);
 		}
 	}
 
diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index ac71f35cc483ea13df703405db0f4b8a796544d3..1485fb0f3215a4d73f1a52d70ad9386f28fcd1a7 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -352,7 +352,7 @@ class bind_plugin {
 				$loglevel = @($dns_config['disable_bind_log'] === 'y') ? LOGLEVEL_DEBUG : LOGLEVEL_WARN;
 				$app->log("Writing BIND domain file failed: ".$filename." ".implode(' ', $out), $loglevel);
 				if(is_array($out) && !empty($out)){
-					$app->log('Reason for Bind restart failure: '.implode("\n", $out), $loglevel);
+					$app->log('Reason for Bind zone check failure: '.implode("\n", $out), $loglevel);
 					$app->dbmaster->datalogError(implode("\n", $out));
 				}
 				if ($old_zonefile != '') {
@@ -524,6 +524,11 @@ class bind_plugin {
 	function rr_delete($event_name, $data) {
 		global $app, $conf;
 
+		if (!empty($data['options']['deleting_dns_soa']) && $data['options']['deleting_dns_soa'] == TRUE) {
+			$app->log("Skipping zone update since it's alse being deleted", LOGLEVEL_DEBUG);
+			return;
+		}
+
 		//* Get the data of the soa and call soa_update
 		$tmp = $app->db->queryOneRecord("SELECT * FROM dns_soa WHERE id = ?", $data['old']['zone']);
 		$data["new"] = $tmp;