In addition to the basic DNS services bundled with my PairNIC domain registration I’m using the services of DynDNS to resolve my current IP address to a hostname.

DynDNS has both free and paid services. With the free service (what I’m using) you can only resolve a name in one of their domains to an dynamic IP.

I chose, because .info domains are rare and strange.

So, great, with a script running on my server (more on this) I can keep pointing to my current IP. But I really want to use the domains that I paid for. Can I do this?

I wasn’t sure, but after doing a few experiments I discovered that the answer is a qualified yes.

Using CNAME records it’s possible to resolve everything except a bare domain (eg, to I’m depending on the smarts of the web spiders and modern browsers to “resolve” to when they discover that doesn’t have any DNS records.

How is it set up?

At PairNIC I’ve set up the following:

  @     MX  10
  www CNAME

and after signing up at DynDNS and setting (by hand, using their web interface) my current IP, everything seems to work.

What happens when my IP address changes (which it does infrequently – every month or so)?

I can run a script (as yet only partly written, though it is in principle very simple) that every minute or so grabs the HTML page describing the current status of my local router, picks the WAN IP address out of this, compares it to its cached value, and if it has changed, does a GET request on DynDNS’s web service to update

Because DynDNS has set very low TTLs (time to live value – how long clients can cache the mapping) of a minute, these updates can propagate quickly.

There are also open-source clients available that DynDNS recommends, and for developers there is a test account to make requests against without getting your own hostname blocked for abuse.

I wrote my own little dynamic DNS updater script.

Anyone can do this. It’s free, it’s fun, and it’s easy!