Wildcard cert file seems not working for sub-subdomain

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

Hi @gitsang,

It seems that abc.my.domain.com is not being matched by *.domain.com

You already said all what you need to know, you have to declare a new certificate *.my.domain.com to match with abc.my.domain.com and serve it with Traefik.

Have a great day!