This patch has recently been merged into the main branch of DDClient, see this post for more details.

Recently, I switched from ZoneEdit to Namecheap for managing my Dynamic DNS, they recommend using DDClient for managing their service on *nix systems (along with IPCheck). Everything seemed to go well, until it came to the first IP change.

[ad name=”AdBrite”]

After the first IP update, all of the sub-domains for OP-EZY changed correctly, along with the main domain for another of the sites hosted here, but the main site, and a different site didn’t update at all. After a lot of research, I found out that the section in DDClient that manages namecheap ignores updates for subdomain that appears more than once. So this means, if one domain uses the standard “www” sub-domain, (like in ), another request to update “www” on another domain (like in will be ignored!

This is down to how ddclient handles these requests. If it sees the same name is trying to be updated, it assumes you accidentally typed the same sub-domain in twice, and ignores it.

Back in 2008, someone created a patch to address this issue on version 3.7.3. For some reason, it didn’t make version 3.8.0, but thankfully, the patch still works!

This guide is written for Ubuntu server users, adapt for your distro as necessary.

Here is the magic code you’ll need:

--- ddclient.old 2010-09-03 18:40:15.064904091 +0100
+++ ddclient 2010-09-03 18:40:14.254904011 +0100

@@ -3274,8 +3274,11 @@

my $url;
$url = "http://$config{$h}{'server'}/update";
- $url .= "?host=$h";
- $url .= "&domain=$config{$h}{'login'}";
+ my $domain = $config{$h}{'login'};
+ my $host = $h;
+ $host =~ s/(.*)\.$domain(.*)/$1$2/;
+ $url .= "?host=$host";
+ $url .= "&domain=$domain";
$url .= "&password=$config{$h}{'password'}";
$url .= "&ip=";
$url .= $ip if $ip;

Copy and paste this into a blank text file, and call it “namecheap.patch”

Alternatively, if this isn’t working for you, there is a patch at DDClient’s Sourceforge page:

Next, you’ll want to copy the DDClient binary to the directory you’re working in:

$ sudo cp /usr/sbin/ddclient .

After that, you’ll want to make sure you have patch installed:

$ sudo apt-get update && sudo apt-get install patch

You then want to apply the patch:

$ patch < namecheap.patch

And copy it back

$ sudo cp ddclient /usr/sbin/ddclient

For good measure, delete the ddclient cache:

$ sudo rm /var/cache/ddclient.cache

and restart ddclient

$ sudo /etc/init.d/ddclient restart

DDClient should now be patched and able to work with multible namecheap domains.

This process will need to be done every time DDClient is updated on your system, unless, of course, the patch has been merged.

What you will need to do, is edit your /etc/ddclient.conf file and edit your sub-domains to include your domain name too. For example, if your domain name is you would change your sub-domain line from:

@, www, subdomain,


Hope this helps, it sure took me many hours to figure this one out!

P.S. don’t forget to restart DDClient after you update your ddclient.conf file!