diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi
index 7be9a50f0..aeb0cd733 100644
--- a/html/cgi-bin/ddns.cgi
+++ b/html/cgi-bin/ddns.cgi
@@ -314,8 +314,17 @@ if ($settings{'ACTION'} eq $Lang::tr{'edit'}) {
# Splitt lines (splitting element is a single ",") and save values into temp array.
@temp = split(/\,/,$line);
+ # Handle hostname details. Only connect the values with a dott if both are available.
+ my $hostname;
+
+ if (($temp[1]) && ($temp[2])) {
+ $hostname = "$temp[1].$temp[2]";
+ } else {
+ $hostname = "$temp[1]";
+ }
+
$settings{'SERVICE'} = $temp[0];
- $settings{'HOSTNAME'} = "$temp[1].$temp[2]";
+ $settings{'HOSTNAME'} = $hostname;
$settings{'PROXY'} = $temp[3];
$settings{'WILDCARDS'} = $temp[4];
$settings{'LOGIN'} = $temp[5];
@@ -536,11 +545,20 @@ END
$col="bgcolor='$color{'color22'}'";
}
+ # Handle hostname details. Only connect the values with a dott if both are available.
+ my $hostname="";
+
+ if (($temp[1]) && ($temp[2])) {
+ $hostname="$temp[1].$temp[2]";
+ } else {
+ $hostname="$temp[1]";
+ }
+
# The following HTML Code still is part of the loop.
print <