Create a subdomain for a user, using a domain that belongs to the admin account

JeffreydeV

Verified User
Joined
Dec 20, 2010
Messages
11
Location
Denmark
I would like to create a subdomain for a user, using a domain that belongs to the admin account.

for example:

I have the domain 24development.nl and added it to the admin account.

When we create a new website for a customer we always make an account and add the future domain to the account. So when the customer is happy with the website all we have to do is change the nameservers or move the domain into our account..

But while we develop, we like to use {projectname}.24development.nl


now I know I can add this as an alias to the user account, but then the DNS doesn't update automatically.

We are currently using 2 servers with multi server setup...
So this is why we cant use the wildcard, sometimes the website is hosted on the first server sometimes its on the second.
And in the future there might be another server.

Does anyone know how to set the domain 24development so the DNS gets automatically updated?

Thanks in advance!
 
You cant have dns update automatically. Just use a wildcard dns.
 
now I know I can add this as an alias to the user account, but then the DNS doesn't update automatically.

What do you mean? You want directadmin to add records into 24development.nl.db (24development.nl zone) when you create a sub-domain as regular domain or alias for your customer? If so, you can use POST script (one of dns_create_post.sh, domain_create_post.sh, domain_pointer_create_post.sh etc) to feet your needs. With that scripts you add necessary records direct into the file 24development.nl.db and initiate DNS syncing with other servers.
 
I always set up subdomains as if setting up a TLD

go into Add a Domain and where it say "Domain Name" type subdomain.domain.com

This way the subdomain gets its own vhost records that you can use it as if it were its own entity, and assign it its own DNS if you wish.

You can even put subdomain.domain.com on a completely different server using this method too.
 
If you do create a subdomain this way on a different server, and if the different server uses different nameservers, then be sure to put NS records for the subdomain in the nameservers for the main domain, or else DNS won't properly propagate.

Jeff
 
I always set up subdomains as if setting up a TLD

go into Add a Domain and where it say "Domain Name" type subdomain.domain.com

This way the subdomain gets its own vhost records that you can use it as if it were its own entity, and assign it its own DNS if you wish.

You can even put subdomain.domain.com on a completely different server using this method too.

Thanks, this worked indeed. So simple :)
 
Back
Top