Problem renewing certificate for one of three domains

Certbot has been set to auto-renew for all three of my domains: table.ethanmckee.net, news.ethanmckee.net, and www.ethanmckee.net. However, it’s only working for the first two domains for some reason. I get the error below when I try to run it for www.

My domain is: www.ethanmckee.net

I ran this command: sudo certbot --nginx -d ethanmckee.net -d www.ethanmckee.net

It produced this output:
IMPORTANT NOTES:

My web server is (include version): https://my.ionos.com/

The operating system my web server runs on is (include version): Ubuntu 18.04

My hosting provider, if applicable, is: https://my.ionos.com/

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): certbot 0.31.0

Certbot has been set to auto-renew for all three of my domains: table.ethanmckee.net, news.ethanmckee.net, and www.ethanmckee.net. However, it’s only working for the first two domains for some reason. I get the error below when I try to run it for www.

1 Like

Hi,

Your www version website doesn't have an IP address linked to it.

It looks like you are using the default Nginx comes with the server.
Can you try to place a file under the path for your domain?
It's your document root then /.well-known/acme-challenge/somethinginhere

After that, please try to visit your domain with that path, and see if there's any file / words appeared rather than the 404 not found error message

and you definietely need to fix your DNS issue before get the certificate.

Thank you

1 Like

I tried placing index.html in var/www/ethanmckee.net/.well-known/acme-challenge and going to http://www.ethanmckee.net/.well-known/acme-challenge/index.html, I get a 404 page.

This means that's not the right folder.
Please create an Nginx dump file with nginx -T and share it to us via a link (something like Pastebin or ubuntu dump would be better)

Also, I can't view your website using the www version, because you used an IPV6 internal address. Please consider updating that to look like the one you have with your root domain. (IPV4 on ionos)

Thank you

1 Like

https://pastebin.com/t8ZyR09E

Sorry, I changed it to an AAAA record and ipv6 address because I saw someone else solved their problem that way. I just changed it back to match the other domains and I’ll stop fiddling with it for now so I don’t interfere with troubleshooting.

1 Like

Hi,

From line 300 in your pastebin share, it specify that your html root is /var/www/ethanmckee.net/html, so you should place the file in that directory (also under .well-known/acme-challenge/)

Not only that, you also have a save file under /etc/nginx/sites-enabled/ethanmckee.net.save, which is a conflict of the current file you have. Can you try to delete that file and reload nginx?

This might not solve the problem why your certbot renewal is failing, but would eliminate the Nginx server issues. (aka, if it didn’t work, we need to dig in certbot configuration file)

Please do try to run certbot renew and see if the error persists.

Thank you

1 Like

I guess that save file was the problem. Thanks.

2 Likes

Glad it worked :slight_smile:

1 Like

P.S. You can eliminate the default server in /etc/nginx/nginx.conf since it might cause some unwanted trouble (if you forget to add a site in Nginx), and hide your server version with servertoken off (Like this)

Thanks

2 Likes

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