wp-encrypt icon indicating copy to clipboard operation
wp-encrypt copied to clipboard

www. is erroneously added to my url when generating a new certificate

Open rootchick opened this issue 7 years ago • 2 comments

I've just updated to 1.0.0-beta.8, and when trying to generate a new certificate, www is being appended at the beginning of my site address, causing the certificate generation to fail with "Challenge remote check failed for domain". The address for my site is a subdomain (linesville.ccfls.org) and I'm not using www.linesville.ccfls.org. I've tried adding that url to my domain registration as well as adding ServerAliases for it to both my http and https configs in apache for the site, and it fails further, but that seems to be beside the point (it's failing because I've attempted to generate the certificate for that url too many times). I don't actually want to have to use www on all my subdomains anyway.

I'm guessing this has to do with the changes to WPENC/Core/Util.php, but I'm not a php guru so I'm not sure how to fix this behavior.

rootchick avatar Nov 29 '17 16:11 rootchick

I think the problem here is that some users (and @felixarntz ) consider generating certificates for both www and non-www version to be a "feature" so they can use SSL for Apache-configured redirects.

Other users (including myself) don't need or want this behavior, as it requires additional DNS setup, particularly for subdomains.

I think the best solution to satisfy everyone would be adding a new plugin-level setting to control whether certificates for both domains are generated, or just those site / network domains that are explicitly requested. Technically, the setting would control the behavior of Util::get_all_domains.

What do you think @felixarntz ?

brianhelba avatar Nov 30 '17 01:11 brianhelba

I'm running into this with one of my sites. I've got 5 days left before my cert expires and I can't renew it because of this. I don't have control of the DNS to add the extra www subdomain.

justdave avatar Jan 02 '18 16:01 justdave