Serving dedicated certs per domain

Hello,

I'm trying to serve ssl certs on a per domain basis - however everything i try is returning the default traefik cert.

I have traefik.yml watching the /sites/ directory, which contains services.yml, site-01.yml site-02.yml etc

The documentation is suggesting I can add the tls certs into the dynamic config which im assuming in my case is site-xx.yml, however that is not working for me.

What I have so far, site-01.yml below;

http:
  routers:
    SITE-01-WEB:
      rule: "(Host(`site-01.com`) || Host(`www.site-01.com`))"
      service: WEB
      tls:
        certificates:
          - certFile: "/certs/site-01.crt"
            keyFile: "/certs/site-01.key"

The site resolves correctly, just doesn't use the correct cert

Thank you

We usually just enable TLS on router with tls: {} and have a dynamic config file loading TLS certs. (Doc)

Traefik will use the right one per router.