When prefer_wildcard_cert: true is set in config.yaml for domains, Traefik still generates individual certificates for each subdomain instead of requesting wildcard certificates.
Every subdomain gets its own specific certificate request instead of using wildcards.
Originally created by @AndrewPaglusch on GitHub (Nov 8, 2025).
Originally assigned to: @oschwartz10612 on GitHub.
### Describe the Bug
Possibly related to [#1816](https://github.com/fosrl/pangolin/issues/1816)
When `prefer_wildcard_cert: true` is set in `config.yaml` for domains, Traefik still generates individual certificates for each subdomain instead of requesting wildcard certificates.
```yaml
domains:
domain1:
base_domain: foobar1.com
cert_resolver: letsencrypt
prefer_wildcard_cert: true
domain2:
base_domain: foobar2.com
cert_resolver: letsencrypt
prefer_wildcard_cert: true
```
I believe this bug was introduced in commit https://github.com/fosrl/pangolin/commit/d938345debe8a515a8d251cdf4bd448e75ef811e on Wed Oct 8, since there seems to be some changes being made around the `preferWildcardCert` setting there.
### Environment
- OS Type & Version: AlmaLinux 9.6
- Pangolin Version: 1.12.1 (Community)
- Gerbil Version: 1.2.2
- Traefik Version: 3.4.0
- Newt Version: 1.6.0
- Olm Version: N/A
### To Reproduce
1. Configure domains in `config.yaml` with `prefer_wildcard_cert: true`:
```yaml
domains:
domain1:
base_domain: foobar1.com
cert_resolver: letsencrypt
prefer_wildcard_cert: true
domain2:
base_domain: foobar2.com
cert_resolver: letsencrypt
prefer_wildcard_cert: true
```
2. Set global preference in `config.yaml`:
```yaml
traefik:
cert_resolver: letsencrypt
prefer_wildcard_cert: true
```
3. Clear the `acme.json` file to force certificate regeneration:
```bash
rm /path/to/letsencrypt/acme.json
```
4. Restart Pangolin and observe the Traefik logs and/or look at certs generated.
### Expected Behavior
The Traefik dynamic configuration should include wildcard domain specifications like:
```json
{
"tls": {
"certResolver": "letsencrypt",
"domains": [
{
"main": "*.foobar1.com"
}
]
}
}
```
This would cause Traefik to request a single wildcard certificate covering all subdomains.
The Traefik dynamic configuration generates individual domain entries instead:
```bash
$ curl -s http://localhost:3001/api/v1/traefik-config | jq '.http.routers | to_entries | .[0] | {router: .key, tls_domains: .value.tls.domains}'
{
"router": "605-prefix-cloud-foobar1-com-router",
"tls_domains": [
{
"main": "cloud.foobar1.com"
}
]
}
```
Every subdomain gets its own specific certificate request instead of using wildcards.
GiteaMirror
added the bug label 2025-11-13 12:10:21 -06:00
@oschwartz10612 Would you mind re-opening this issue if you can confirm it's still a problem?
@AndrewPaglusch commented on GitHub (Nov 9, 2025):
This bug still appears to be present in the latest release 1.12.2.
```
[root@cloud-dmz:/opt/docker/pangolin]# docker exec -it pangolin curl -s http://localhost:3001/api/v1/traefik-config | jq '.http.routers | to_entries | .[0] | {router: .key, tls_domains: .value.tls.domains}'
{
"router": "605-prefix-cloud-foobar1-com-router",
"tls_domains": [
{
"main": "cloud.foobar1.com"
}
]
}
```
I can see individual certs still being generated:
```
jq '.letsencrypt.Certificates[].domain' < /opt/docker/pangolin/config/letsencrypt/acme.json
{
"main": "plex.foobar1.com"
}
{
"main": "photos.foobar2.com"
}
{
"main": "cloud.foobar3.net"
}
[...]
```
@oschwartz10612 Would you mind re-opening this issue if you can confirm it's still a problem?
@AndrewPaglusch commented on GitHub (Nov 11, 2025):
@Anmol202005 Would you mind sharing your redacted config with me? I'd like to see if you're configuring wildcard domains differently than I am. Thanks!
In your redacted output above, I noticed you have two wildcard domains returned for the same (fake) domain. In your real output, are there two different wildcards being returned, each for different domains, or are they each for the same domain?
@AndrewPaglusch commented on GitHub (Nov 11, 2025):
@Anmol202005 Would you mind sharing your redacted config with me? I'd like to see if you're configuring wildcard domains differently than I am. Thanks!
In your redacted output above, I noticed you have two wildcard domains returned for the same (fake) domain. In your _real_ output, are there two different wildcards being returned, each for different domains, or are they each for the same domain?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @AndrewPaglusch on GitHub (Nov 8, 2025).
Originally assigned to: @oschwartz10612 on GitHub.
Describe the Bug
Possibly related to #1816
When
prefer_wildcard_cert: trueis set inconfig.yamlfor domains, Traefik still generates individual certificates for each subdomain instead of requesting wildcard certificates.I believe this bug was introduced in commit https://github.com/fosrl/pangolin/commit/d938345debe8a515a8d251cdf4bd448e75ef811e on Wed Oct 8, since there seems to be some changes being made around the
preferWildcardCertsetting there.Environment
To Reproduce
config.yamlwithprefer_wildcard_cert: true:config.yaml:acme.jsonfile to force certificate regeneration:Expected Behavior
The Traefik dynamic configuration should include wildcard domain specifications like:
This would cause Traefik to request a single wildcard certificate covering all subdomains.
The Traefik dynamic configuration generates individual domain entries instead:
Every subdomain gets its own specific certificate request instead of using wildcards.
@AndrewPaglusch commented on GitHub (Nov 9, 2025):
This bug still appears to be present in the latest release 1.12.2.
I can see individual certs still being generated:
@oschwartz10612 Would you mind re-opening this issue if you can confirm it's still a problem?
@Anmol202005 commented on GitHub (Nov 10, 2025):
@AndrewPaglusch tried reproducing works good :
@AndrewPaglusch commented on GitHub (Nov 11, 2025):
@Anmol202005 Would you mind sharing your redacted config with me? I'd like to see if you're configuring wildcard domains differently than I am. Thanks!
In your redacted output above, I noticed you have two wildcard domains returned for the same (fake) domain. In your real output, are there two different wildcards being returned, each for different domains, or are they each for the same domain?