Adding Wildcard DNS Using Directadmin

By | May 5, 2008

Now to add wildcard DNS using DirectAdmin

If you ‘re planning to use multiple subdomains within your account you will need to setup wildcard DNS resolving. There is an easy solution in DirectAdmin that allows you to do this without modification of certain configuration files. Just log in as admin and choose DNS administration tab under Admin Tools. Select your domain and add an A record for it. Usually you should add A record for the same Ip address as the site has assigned. Bind (named) will be automatically restarted and your changes will propagate soon. This should look like in the picture below.

At this point your subdomains are resolving to the IP address You need. The next action that needs to be performed is Apache Virtualhost modification. Since you are using DirectAdmin this can be done via its interface.
Go to Custom HTTPD Configurationstab and select your domain there. In order to setup further processing you need to add the following line to Virtualhost:

ServerAlias *.|DOMAIN|

Apache will be restarted automatically or you can manually perform the restart process at Service Monitor tab.

Now Your subdomains should be fully accessible. You can also read Directadmin Help Article but I hope my post is more informative :)