I am using a custom wildcard certificate in Traefik 2. My certificate file is configured for *.domain.com
and domain.com
.
Here is my TLS configuration:
tls:
certificates:
- certFile: /certs/domain.cert
keyFile: /certs/domain.key
When my route configurations are as follows:
http:
routers:
to-app:
tls: true
rule: "Host(`my.domain.com`)"
service: app
services:
app:
loadBalancer:
servers:
- url: "http://<my-ip>"
it work fine.
However, for sub-subdomains like:
rule: "Host(`abc.my.domain.com`)"
It does not work. When I visit https://abc.my.domain.com
, it still uses the default Traefik certificate instead of my custom wildcard certificate.
It seems that abc.my.domain.com
is not being matched by *.domain.com