Setting multiple domains
pietrovismara opened this issue · 4 comments
I have a domain called example.com. I'd like to have a certificate for both www.example.com and example.com.
I'm trying to set the domains
property in the options of auto-sni like this:
domains: ["example.com", "www.example.com"]
, but it doesn't work and i have no error messages.
What am i doing wrong?
Can you paste your full config?
Here it is:
{
email: "mymail@gmail.com", // Emailed when certificates expire.
agreeTos: true, // Required for letsencrypt.
debug: false, // Add console messages and uses staging LetsEncrypt server. (Disable in production)
domains: ["example.com", "www.example.com"], // List of accepted domain names. (You can use nested arrays to register bundles with LE).
forceSSL: false, // Make this false to disable auto http->https redirects (default true).
ports: {
http: 80, // Optionally override the default http port.
https: 443 // // Optionally override the default https port.
}
}
Can you try changing domains to:
domains: [["example.com", "www.example.com"]]
This will bundle the two domains together. Also can you confirm there any no error messages and that the server is reachable at these domain names using a regular http request?
I notice you have forceSSL off, this will stop redirecting the user to the https version of the site - just want to make sure that:
a) This was intended to be on and
b) You can access the http site.
Going to close due to inactivity. Feel free to reply if this didn't solve your issue.