Multiple Sites / Domains

I have played with Traefik in the past. Setting things was not too hard and I wrote about it here . Mainly wanted to run Laravel with Traefik and that did work.

But what I wondered about is the option to work with many domains. In the .toml file we tend to have something like this to get domains their SSL Certificate:

# main = ""
# sub = ""

But what if I want to add SSL certificates to all domains / sites added to the server automatically? This so I can keep on adding sites and have them secure with Let's Encrypt SSL. Is it then possible to do this like you could with DNS Lexicon, Dehydrated and a reverse Nginx server?

With Dehydrated and DNS Lexicon new certificates are added to domains leading to server on the fly if they have not yet already. That is very convenient. No need to add domains to a file. How do you do this with Traefik?


domains are optional, by default Traefik (v2 and v1) use the Host rule define in the router/frontend to create certificates.

domains are mainly for manage wildcard certificates.

1 Like

Realized I have one more question though. That you do not have to add domains as long as you can use the Host rule in the router/frontend is great. But if we work with many different domains this means that all sites hitting Traefik that do not have a LE SSL Certificate will get one?

Two, would you have an example of such a Host rule?