Add to Favorites

Sub domain creation on the fly with DNS Bind

Using Cpanel/Whm - I had to set up bind to accept any subdomain. In the /var/named folder there are a bunch of *.db files. Find the appropriate file for your domain. Set it up to look something like this:

$TTL 14400
@ 86400 IN SOA ns1.yourdomain.com. email.domain.com. (
2006090901 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds

yourdomain.com. 86400 IN NS ns1.yourdomain.com.
yourdomain.com. 86400 IN NS ns2.yourdomain.com.

yourdomain.com. IN A 72.232.86.10

localhost.yourdomain.com. IN A 127.0.0.1

yourdomain.com. IN MX 0 yourdomain.com.

mail IN CNAME yourdomain.com.
www IN CNAME yourdomain.com.
ftp IN A 72.232.86.10
* 14400 IN A 72.232.86.10

Restart bind. If this alone doesn't work, apache's config might need to be adjusted. Let me know.

- James

On 7/27/07, Shad wrote:

James - what method are we using for dynamically creating subdomains on excite?

Are we just modifying DNS records/bind?

Didn't we do this somewhere else as well?
I know with keysem we modified the apache config file where the virtual domain entries are located.

Comments

Be the first to leave a comment on this post.

Leave a comment

To leave a comment, please log in / sign up