How to specify multiple domains in command

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: goravani.com

Given this command:

sudo certbot certonly --webroot -w /Users/administrator/Documents/demowebsite/ -d demo.macminivault.com -d www.demo.macminivault.com

Question:

How do you exactly list multiple domains so it does them all in one cert? What is the syntax… way… to list multiple domains… I have 5… I’m having trouble getting MAMP to accept individual certs… it may go better if I have one cert pair that handles all 5… I thought I understood that is possible from reading Certbot docs… thank you for your help.

Dan

1 Like

You’ve already put multiple hostnames in your command. It’s no different for other domains.

1 Like

I have 5 different domains, dot coms, that I am trying to get a cert for, one cert

what is the command to do this, what is the syntax… the command above seems to only work for one website and it’s www name… I tried putting in multiple -d but it didn’t like it.

1 Like

Well, putting in multiple -d options is the correct method. However, you’ve also specified -w with a specific webroot. If that webroot is not the same for every hostname used with -d, you’ll need to specify multiple webroots too.

Please read the Certbot manual, specifically the part about the webroot plugin: https://certbot.eff.org/docs/using.html#webroot. It mentions the scenario you’re describing in the second paragraph.

1 Like

I made a number of attempts and finally got it right, and was able to put all my domains into one certificate WHICH MAMP LIKED… it took that in just fine… it seems to like things that are linked to the first entered host inside itself… anyways, I’m running fine now. Thank you.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.