Wildcard domains allow you to serve multiple subdomains under a single domain (e.g., *.example.com
) through your Blossom application, with SSL termination handled directly by your Blossom servers. This is useful when you need to dynamically handle multiple subdomains without configuring each one individually.
Note: If you’re using a CDN like Cloudflare, CloudFront, or Akamai, you’ll want to follow our CDN Wildcard Domains guide instead, as the SSL termination happens at the CDN level.
Overview
A wildcard domain certificate covers your main domain and all its subdomains. For example, a certificate for *.example.com
will secure:
- test.example.com
- staging.example.com
- client1.example.com
- any-subdomain.example.com
Requirements
To use wildcard domains, you need:
- A DNS provider configured in Blossom that supports DNS validation
- Administrative access to manage DNS records for your domain
Supported DNS Providers
Blossom supports the following DNS providers for wildcard domains:
Blossom supports wildcard domains via Caddy. When validating certificates, Caddy automatically adds a TXT DNS record, validates it, and immediately removes it.
Configuration Steps
- First, ensure you have a DNS provider configured in Blossom:
- Navigate to DNS Providers section
- Click “Add New Provider”
- Select your provider and enter the required credentials
- Configure your wildcard domain:
- Go to your app’s Custom Domains section
- Click “Add New Domain”
- Enter your wildcard domain (e.g.,
*.example.com
) - Select “HTTPS Wildcard” as the SSL mode
- Choose your DNS provider from the dropdown
- After creation, Blossom will:
- Automatically configure DNS validation
- Obtain a wildcard SSL certificate through Let’s Encrypt
- Set up the necessary proxy configurations
DNS Validation
Wildcard certificates require DNS validation (as opposed to HTTP validation) because they secure multiple subdomains. Blossom automatically handles this by:
- Creating the required DNS validation records through your DNS provider
- Verifying the records are properly set
- Completing the certificate issuance process
Important Notes
- Wildcard certificates only cover one level of subdomains. For example,
*.example.com
will coverblog.example.com
but nottest.blog.example.com
- The DNS provider must be properly configured with the necessary permissions for automated DNS validation
- Certificate renewal is handled automatically by Blossom
Troubleshooting
If you encounter issues with wildcard domain setup:
- Verify your DNS provider credentials are correct and have the necessary permissions
- Check that your domain’s nameservers are properly configured to use your selected DNS provider
- Allow up to 15 minutes for DNS changes to propagate and the certificate to be issued
- For detailed debugging steps, see our Caddy debugging guide
Alternative Approaches
If you’re using a CDN to handle SSL termination for your wildcard domains, see our guide on CDN Wildcard Domains.