Question about [[acme.domains]] and default 404 message

Hello, I just migrated from v1 to v2 and I have only one thing that bothers me,
With my previous configuration I had :

[[acme.domains]]
 main = example.org

So when I went on example.org, i had the message "404 page not found" with the correct certificate.

Now when I go on it, I have the NET::ERR_CERT_AUTHORITY_INVALID instead of my previous 404 error.

I tried to add a fake router like so in the traefik.toml :

[http.routers]
 [http.routers.defaultdomains]
   rule = "Host(`example.com`,`example.org`)"
   [http.routers.defaultdomains.tls]
     certResolver = "letsencrypt"

I even tried adding

      [[http.routers.defaultdomains.tls.domains]]
        main = "example.com"
      [[http.routers.defaultdomains.tls.domains]]
        main = "example.org"

with no success.

How can I restore the previous behavior ? Thanks

traefik.toml ususally is static configuration, but what you are citing above is dynamic configuration. Read about the differences here: https://docs.traefik.io/getting-started/configuration-overview/

It's quite possible that this is not your only problem, but you definitely should start here.

Some other tips:

  • Enable debug log and examine it for clues
  • Look at static and dynamic configuration dumped to the debug log and compare it with what you expect to see there
  • Enable trafik dashboard and examine what routers / server are actually getting created

I have no problem with actually creating routers & services for my containers.

My problem is really about this 404 error which in v1 had a behavior (a 404 issued with the domain certificate) and in v2 is getting a NET::ERR_CERT_AUTHORITY_INVALID error.
And I would like to know if there is a v2 way to have the same behavior on 404 errors.

It's clearly not that important, but I just dislike to have "errors" on domains that I configure my traefik server IP.

Awesome! Hope my tips above help you with that :wink: