Invalid response from .well-known when running certbot

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 --apache

It produced this output:
Performing the following challenges:
http-01 challenge for
Waiting for verification...
Challenge failed for domain
http-01 challenge for
Cleaning up challenges
Some challenges have failed.


My web server is (include version): Apache/2.4.41 (Ubuntu)

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

My hosting provider, if applicable, is: AWS

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.40.0

I have been trying to fix this issue for days and still no results. I have checked that port 80 and 443 are allowed in the security groups for the AWS EC2 instance and also checked that the DNS records are correct. Please help!

1 Like

Hi @nathan-jimin,

What's the output of:

sudo apachectl -t -D DUMP_VHOSTS
1 Like

Hi @_az!
Here is the output
ubuntu@gencyberbook:/etc/apache2/sites-available$ sudo apache2ctl -t -D DUMP_VHOSTS
VirtualHost configuration:
*:80 is a NameVirtualHost
default server (/etc/apache2/sites-enabled/000-default.conf:2)
port 80 namevhost (/etc/apache2/sites-enabled/000-default.conf:2)
port 80 namevhost (/etc/apache2/sites-enabled/ossn.conf:1)

1 Like

Try add a dummy ServerName in this VirtualHost, like ServerName

I should also mention that this relates to a bug we fixed very recently in Certbot 1.17.0:

  • The Apache authenticator now always configures virtual hosts which do not have an explicit ServerName . This should make it work more reliably with the default Apache configuration in Debian-based environments.

... so if you install Certbot using our snap or pip instructions, it should work without the workaround.


Thank you so much! The certificate is now installed, but it seems I am going to do some other troubleshooting for apache2 now. This does fix my problem though!


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