diff --git a/interface/web/dns/dns_edit_base.php b/interface/web/dns/dns_edit_base.php
index 4f61b71ce5e4c3079e50a75093bdb5bb9a4a402c..a94bd54946d3cc0fe67d28d6361863ad6a21908a 100644
--- a/interface/web/dns/dns_edit_base.php
+++ b/interface/web/dns/dns_edit_base.php
@@ -112,7 +112,17 @@ class dns_page_action extends tform_actions {
 				}
 			}
 		} // end if user is not admin
-		
+
+		// Replace @ to example.com.
+		if($this->dataRecord["name"] === '@') {
+			$this->dataRecord["name"] = $soa['origin'];
+		}
+
+		// Replace * to *.example.com.
+		if($this->dataRecord["name"] === '*') {
+			$this->dataRecord["name"] = '*.' . $soa['origin'];
+		}
+
 		if($this->checkDuplicate()) $app->tform->errorMessage .= $app->tform->lng("data_error_duplicate")."<br>";
 
 		// Set the server ID of the rr record to the same server ID as the parent record.