A wildcard subdomain routes all subdomains (e.g. anything.yourdomain.com) to your site, letting your application handle the routing logic.
In DirectAdmin → DNS Management → Add Record:
Name: *
Type: A
Value: [your server IP address]
TTL: 3600
This routes all *.yourdomain.com to your server.
Go to Subdomains → create a subdomain with * as the prefix.
Not all DirectAdmin versions support wildcard subdomains via the panel. Contact support if needed.
Your application must handle routing by reading the subdomain from HTTP_HOST. Example in PHP:
$subdomain = explode('.', $_SERVER['HTTP_HOST'])[0];
// Route to the correct tenant
A standard Let's Encrypt certificate doesn't cover wildcard subdomains. For wildcard SSL:
*.yourdomain.com) using DNS challenge.