Issue with transfering sites with SSL from host to host

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. |, so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:

I ran this command: sudo certbot certonly --webroot -w /var/www/ -d -d --dry-run

It produced this output: Saving debug log to /var/log/letsencrypt/letsencrypt.log
Simulating renewal of an existing certificate for and

Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Type: unauthorized
Detail: Invalid response from 404

Type: unauthorized
Detail: Invalid response from 404

Hint: The Certificate Authority failed to download the temporary challenge files created by Certbot. Ensure that the listed domains serve their content from the provided --webroot-path/-w and that files created there can be downloaded from the internet.

Some challenges have failed.
Ask for help or search for solutions at See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
mgs@xjruagabot:~ $

My web server is (include version): NGINX 1.20.1, PHP 8.1.8

The operating system my web server runs on is (include version): CentOS8 update to AlmaLinux Tiger

My hosting provider, if applicable, is:

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

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): 1.22.0

The HTTP authentication requests are being redirected to HTTPS.
But the HTTPS requests find:

curl -Ii
curl: (51) SSL: no alternative certificate subject name matches target host name ''

I would handle the HTTP authentication requests in HTTP [don't redirect them]


I have changed 'return 301' statement inside the site config file so it would return http instead of https and now I get "Redirect loop detected" instead.

You created the loop.


I have discovered the issue in the site config file. Thanks and sorry to bother.


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