How Traefik TLS works. Traefik will first look for a matching cert (by hostname encoded in the cert, works with wildcards) in your list of defined certs:
tls:
certificates:
- certFile: /path/to/domain.cert
keyFile: /path/to/domain.key
- certFile: /path/to/second-domain.cert
keyFile: /path/to/second-domain.key
If no match is found, then Traefik will use the single cert in the default store:
tls:
stores:
default:
defaultCertificate:
certFile: path/to/cert.crt
keyFile: path/to/cert.key
If nothing is defined, it will create a custom Traefik cert, which the browser will warn about.
Make sure your cert files have the correct content:
certFile:
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
keyFile:
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----