Domain name order

Hello!

Is there any way to change the order of domains in the client?

I have configured all of my Apache virtualhosts in one file, in the following order:
example.com (alias www.example.com)
mail.example.com
test.example.com

But when I run letsencrypt-auto, it displays them in the following order:
mail.example.com
www.example.com
example.com
test.example.com

Because of this, the certificate’s (common) name will be mail.example.com instead of example.com. It’s not a big deal, but annoys me.

1 Like

I suggest that the client should choose the naked domain (example.com) as a common name, if there is no naked domain, the www. subdomain.

Also there should be a option to select common name.

2 Likes

indeed same happened here Letsencrypt Webroot Authentication Tested on Beta invited/whitelisted domain the order was reversed in my case

I would also like to control the order, or at least the common name (i.e. the name of the certificate group).

The common name will be set to the first domain passed to the client via -d example.com, so if you need to control the common name value, the easiest way to do that is pass the domain list explicitly (as opposed to letting the apache plugin detect them in “random” order).

ok, good to know. I read the exact opposite in a forum, that it was taking the last one.
Thanks.