Adding subdomain failed - HSTS enabled

I have certificate generated for skyots.pl
I have HSTS configured for skyots.pl
www.skyots.pl isn't working, because certificate doesn't include www. submdomain for skyots.pl
I'm trying to expand my certificate, but I can't. Its probably because of HSTS, client can't connect to www.skytos.pl, because there is invalid certificate...
So... I can't generate valid certificate for my website subdomain, because... it has invalid certificate and HSTS enabled...
What should I do?

My domain is:

skyots.pl

I ran this command:

certbot certonly --webroot --agree-tos -w /etc/letsencrypt/ --expand -d skyots.pl,www.skyots.pl

It produced this output:

Failed authorization procedure. www.skyots.pl (http-01): urn:acme:error:connection :: The server could not connect to the client to verify the domain :: Could not connect to www.skyots.pl

IMPORTANT NOTES:

  • The following errors were reported by the server:

Domain: www.skyots.pl
Type: connection
Detail: Could not connect to www.skyots.pl

To fix these errors, please make sure that your domain name was
entered correctly and the DNS A record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.

My operating system is (include version):

Linux skyots.pl 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux
Description: Debian GNU/Linux 8.6 (jessie)

My web server is (include version):

nginx version: nginx/1.11.6

My hosting provider, if applicable, is:

ovh

I can login to a root shell on my machine (yes or no, or I don't know):

yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

no

Let’s Encrypt does not implement or keep track of HSTS. The first verification request for each domain is always sent on port 80 via HTTP, which then may redirect to a https URL on port 443.

This seems to be a server misconfiguration on your end for the www subdomain, it doesn’t seem to be serving anything. Compare the following two curl outputs:

$ curl -v http://skyots.pl/.well-known/acme-challenge/test
*   Trying 164.132.106.38...
* Connected to skyots.pl (164.132.106.38) port 80 (#0)
> GET /.well-known/acme-challenge/test HTTP/1.1
> Host: skyots.pl
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Server: nginx/1.11.6
< Date: Sat, 19 Nov 2016 10:03:00 GMT
< Content-Type: text/html
< Content-Length: 185
< Connection: keep-alive
< Location: https://skyots.pl/.well-known/acme-challenge/test
<
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.11.6</center>
</body>
</html>
$ curl -v http://www.skyots.pl/.well-known/acme-challenge/test
*   Trying 164.132.106.38...
* Connected to www.skyots.pl (164.132.106.38) port 80 (#0)
> GET /.well-known/acme-challenge/test HTTP/1.1
> Host: www.skyots.pl
> User-Agent: curl/7.43.0
> Accept: */*
>
* Empty reply from server
* Connection #0 to host www.skyots.pl left intact
curl: (52) Empty reply from server
1 Like

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