How to do LE with multiple domains on one host with Traefik 3.0.0 Beta?

Continuing the discussion from Traefik 2 with Letsencrypt and multiple domains per host:

  • "traefik.http.routers.someapp.rule=Host(someapp.com, www.someapp.com)"

Result:

error="error while adding rule Host(someapp.com, www.someapp.com):
error while adding rule Host: unexpected number of parameters; got 2, expected one of [1]" entryPointName=websecure routerName=someapp@docker

In my DNS www.someapp.com has an A record to someapp.com

Use Host(`x`) || Host(`y`). See v3 doc.

Worked, thank you! As a side question, what is the point of doing a wildcard cert? It seems almost magic that I can just do Host('whatever.someapp.com') and each time I add a new whoami with a different subdomain it gets an LE cert no problem.

Why would I want to get a wildcard cert if its so easy for LE to issue me new certs for subdomains?

Back in the days the certs needed to be purchased, wildcards were cheaper than individual ones.

1 Like

You can only make so many requests per day/week with LE, before being rate limited.

Also, if you get a wildcard certificate you won't have all of your individual domains listed in the certificate transparency logs, only the wildcard one.

I just checked and was surprised:

The main limit is Certificates per Registered Domain (50 per week)

(Source)

So you better not have 100 individual sub-domains and lose your acme.json file :wink:

Follow-up question: When using Host(x) || Host(y) I only get a letsencrypt certificate for the first host. The second host uses TRAEFIK DEFAULT CERT.

I was hoping to get a certificate for every host. Is this expected or did I misconfigure something?

Edit: Never mind, it works perfectly. I had to re-read Traefik Let's Encrypt Documentation - Traefik and configure my labels as described :roll_eyes: :grin: