Search Our Database
How to enable Wildcard subdomain name on DirectAdmin
Introduction
This article explains how to enable a wildcard subdomain in DirectAdmin. A wildcard subdomain allows any subdomain (e.g., *.yourdomain.com.my) to point to the same server and serve the same content or application. This is useful for multi-tenant applications or dynamic subdomain setups.
Prerequisites
- Access to DirectAdmin with administrative privileges
- DNS setup already configured to support wildcard subdomains
Step-by-Step Guide
Step 1: Access DirectAdmin
Browse and Login to your Directadmin as admin. eg. https://yourdomain.com:2222
Step 2: Navigate to the “Extra Features” section
- Once you’re logged in, make sure you are on Admin level
- Navigate the Extra Features section on the main dashboard. Click on Custom HTTPD Configurations
- Click on the domain you would like to edit
Step 3: Configure Wildcard Subdomain in DirectAdmin (Custom HTTPD Configurations)
- You will see fields where you can manually enter additional HTTPD configuration for the domain.
- Add the following and save the changes
ServerAlias *.yourdomain.com.my
Step 4: Verify Wildcard Subdomain Functionality
- Test the wildcard subdomain by typing a random subdomain in your browser, such as test.yourdomain.com.my, and check if it loads the main website or desired content.
Conclusions
By following these steps, you can enable wildcard subdomains using the DirectAdmin interface, allowing dynamic subdomain support for your domain.