Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to host a subdomain-based SaaS application on a bunch of servers. Servers are, and so on. I want to have a bunch of sites hosted on those servers.

Because sites are created on the fly, I need to be able to set up DNS records on the fly as well. A DNS wildcard zone doesn't really scale as eventually I will outgrow the first server and need to push new instances onto other machines. I therefore need to be able to point a specific subdomain to a specific IP address.

I looked around for API-based cloud DNS services (which would be great) but they seem outrageously expensive for my needs (lots of low volume instances). Rackspace has a free Cloud DNS service but it only goes up to 500 zones, and tech support told me they are rewriting the API so I would like to avoid their service for the time being.

Therefore I figured I will set up my own DNS server for these zones. Hence the questions: what's a good DNS server software for this specific need that will allow me to create zones without restarting?

Any suggestions? Thanks!

share|improve this question
Are you creating new zones, or just adding records to an existing zone? – Zoredache Oct 25 '11 at 20:51
To echo @Zoredache, are you adding new zones? I think you might be mixing terms. A zone is just a subset of a single domain. Looks like you want to add subdomains. You might want to edit your question if this is the case. – slillibri Oct 25 '11 at 21:08
Fair point, I should only be adding records for subdomains to a zone. – GomoX Oct 25 '11 at 21:10
up vote 9 down vote accepted

If all the records you will be adding are a sub-domain of a specific zone, then you could easily setup bind for dynamic updates. Then simply use nsupdate to submit an update to the zone.

This should work fine, if all the new records are records within an existing domain. If you need to dynamically add other domains, then this won't really help.

// zone config
// using ip only for authentication, should really use hmac auth
zone "" {
        type master;
        file "/etc/bind/dyn/";
        allow-query {any;};
        allow-update {

Update script using nsupdate.

 echo "server"
 echo "zone"

 echo "update delete ${record} A"
 echo "update add ${record} ${ttl} A"
 echo "send"
) | /usr/bin/nsupdate
share|improve this answer
I actually ended up using PowerDNS (with a replicated MySQL backend) as suggested in another reply. But your answer is very thorough so here you go :) – GomoX Nov 10 '11 at 18:54
Could you please elaborate on the nsupdate script? For example, why the And why are you deleting an A record? Basically I want my subdomains to be pointed to external nameservers (provided by my customers, whom manage their own hosting). How would I do this? Add NS records instead of A records? – Tom Dec 1 '13 at 11:27

I use myDNS It works great and is simple, it also can work with BIND easily. There are other ones out there like PowerDNS and others.

share|improve this answer

bind is able to (re-) load files for single domains without restarting in whole.

share|improve this answer
If you add a zone the new zone will not be parsed in a reload. So I don't think this fits with the OP's question. – kaptk2 Oct 25 '11 at 20:14
The OP added a comment, he's not adding zones, just records for subdomains. – ott-- Oct 25 '11 at 22:03

either go with the rndc interface of bind or what i would prefer: use PowerDNS

share|improve this answer

djbdns updates are entirely transparent - no interruptions - and the 'zonefile' structure is ideally suited to scripted modification and automation. The record format is completely unlike BIND, but it's not nearly as difficult to understand as it appears at first glance. Highly recommended.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.