Https with www not working

My domain is:

I ran this command: We have run below command

  1. ./letsencrypt-auto --apache -d -d
  2. sudo certbot --apache -d -d
  3. certbot certonly --webroot -w /var/www/html/ -d -d

It produced this output: To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.

But we have also add A record with “www”

My web server : ubuntu xenial apache

What error(s) did Certbot say there were?

(If necessary, please paste /var/log/letsencrypt.log.)

Thanks for reply.

When we run this command like “sudo certbot certonly --webroot -w /var/www/html/ -d -d

Display error like

Failed authorization procedure. (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from "

<style type="text/css">



This is probably a misleading error message. Misconfigured DNS could cause this result (i.e., LE is hitting the wrong machine), but a more likely issue is that you’re specifying the wrong webroot path. If you create a plain text file at /var/www/html/.well-known/acme-challenge/test.txt, and then browse to, you should see that text file, without needing to log in or anything else. If not, you need to do something with your webserver configuration.


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