Setting Up Wildcard Subdomains and Automated SSL Certificates for Club Subpages on Virtualmin
Learn how to set up wildcard subdomains for club subpages such as member area, event calendar, and press archive on a Virtualmin server and automatically obtain SSL certificates from Let's Encrypt.
Wildcard Subdomains and SSL for Club Subpages
Clubs often face the challenge of organizing different areas such as member area, event calendar, and press archive under one domain. Wildcard subdomains offer an elegant solution: You can create any number of subpages like mitglieder.dein-verein.de, veranstaltungen.dein-verein.de, or presse.dein-verein.de without having to maintain DNS records for each one individually. In this guide, we show you how to set up wildcard subdomains on a Virtualmin server and automatically obtain SSL certificates from Let's Encrypt.
Prerequisites
- A Virtualmin server (e.g., on a virtual server at Dezhost)
- A domain pointing to your server (e.g., dein-verein.de)
- Administrator access to Virtualmin
- Basic knowledge of DNS and server administration
Step 1: Set DNS Records for Wildcard Subdomain
To ensure all subdomains point to your server, you need a wildcard DNS record. Log in to your DNS provider (or use Virtualmin's DNS module if the domain is managed there) and create the following record:
- Type: A
- Name: *
- Value: IP address of your server (e.g., 192.0.2.1)
- TTL: 3600 (or as needed)
This record ensures that all subdomains like mitglieder.dein-verein.de point to the same IP address. Don't forget to also set an A record for the main domain (without wildcard) if not already present.
Step 2: Create Virtual Server in Virtualmin for the Main Domain
If not already done, create a virtual server in Virtualmin for your main domain dein-verein.de. Go to Create Server and fill in the required fields. Make sure the domain is correctly assigned and the server is running.
Step 3: Enable Wildcard Subdomain in Virtualmin
Virtualmin offers the ability to manage wildcard subdomains directly. Go to Edit Server > Website Options and check the box for Wildcard Subdomain? or enter the value *.dein-verein.de in the Alternative Server Names field. This will capture all subdomains in the configuration.
Alternatively, you can create a separate virtual server for each subdomain, but the wildcard method is less maintenance-intensive and more flexible.
Step 4: Obtain SSL Certificate with Let's Encrypt
Virtualmin integrates seamlessly with Let's Encrypt. To obtain a wildcard certificate, proceed as follows:
- Open the virtual server for dein-verein.de.
- Navigate to Configure Server > SSL Certificate > Let's Encrypt.
- Select the option Request Wildcard Certificate (if available) or enter both the main domain and
*.dein-verein.dein the Domain Names field. - Confirm the request. Virtualmin handles validation and installation.
Note: Wildcard certificates require DNS validation. Ensure that your DNS provider offers API support or that you can set the TXT records manually. Virtualmin supports common providers such as Cloudflare, Route 53, and others.
Step 5: Set Up Automatic Renewal
Let's Encrypt certificates are only valid for 90 days. Virtualmin sets up a cron job by default that performs renewal automatically. Check under Webmin > Scheduled Cron Jobs whether a job for certificate renewal exists. If not, you can manually create a job that regularly runs virtualmin generate-letsencrypt-cert --domain dein-verein.de --wildcard.
Step 6: Create Subdomains for Club Areas
After the wildcard subdomain and SSL certificate are set up, you can create the individual areas as subdomains. In Virtualmin, create new virtual servers with the corresponding names, e.g., mitglieder.dein-verein.de. Since the wildcard DNS already exists, no further DNS changes are needed. Assign the previously obtained wildcard certificate to each area or obtain a separate certificate (Let's Encrypt also supports multiple domains in one certificate).
Security Tips
- Use access restrictions for the member area (e.g., password protection or IP-based restriction).
- Enable HTTP/2 and HSTS for better security.
- Monitor certificate expiration with the server status.
- Use web hosting or virtual servers from Dezhost for optimal performance.
With this guide, you can structure your club website professionally while benefiting from automated SSL certificates. If you have any questions, our support is happy to help.

