Failed authorization procedure with www



I am having probleem configuring my domain with https. It is wokring with but when I try, I get this error.

How can solve this?

My domain is:

I ran this command:
certbot --nginx

It produced this output:
Obtaining a new certificate

Performing the following challenges:

http-01 challenge for

Waiting for verification…

Cleaning up challenges

Failed authorization procedure. (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from "<!DOCTYPE HTML>\n<html lang=“en-US”>\n<head>\n <meta charset=“UTF-8” />\n <meta http-equiv=“Content-Type” content=“text/html; char”


_ - The following errors were reported by the server:_


Type: unauthorized

Detail: Invalid response from

"<!DOCTYPE HTML>\n<html lang=“en-US”>\n<head>\n <meta

charset=“UTF-8” />\n <meta http-equiv=“Content-Type”

content=“text/html; char”

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.

My web server is (include version):
nginx version: nginx/1.14.0 (Ubuntu)

The operating system my web server runs on is (include version):
VERSION=“18.04.1 LTS (Bionic Beaver)”



PRETTY_NAME=“Ubuntu 18.04.1 LTS”



Your hostnames have different IP addresses:		300	IN	A		300	IN	A
;; Received 75 bytes from in 13 ms		300	IN	A
;; Received 55 bytes from in 15 ms

Also, when I surf to, I’m getting a 404 error, while results in the nginx welcome page.

By the way, when I manually check for the hostname on the IP (i.e., from, I’m getting a 404 file not found too. So I guess there’s also something wrong with your virtualhosts.


Hi @abbasalwash

this isn’t a certificate problem.

You have the typical cloudflare configuration. Your ip addresses:

Host T IP-Address is auth. ∑ Queries ∑ Timeout A yes 1 0
AAAA yes A yes 1 0
A yes 1 0
AAAA 2606:4700:0030:0000:0000:0000:681F:4C03 yes
AAAA 2606:4700:0030:0000:0000:0000:681F:4D03 yes

Non-www is your domain, www is via Cloudflare.

All connections are ok. Your non-www uses
	19.04.2019 - 1 entry

your www has a “big certificate” from Cloudflare:, OU=PositiveSSL Multi-Domain, OU=Domain Control Validated

	10.07.2019, *, *, *, *, 
*, *, *, *, 
*, *, *, *, 
*, *, *, *, *, 
*, *, *, *, *, 
*, *, *, *, *, *, 
*, *, *, *, *, 
*, *, *, *, *,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, - 77 entries

Your non www + https shows the standard nginx - page.

Your www + https shows the 404 - not found.

So don’t create a new certificate, this isn’t required if you use Cloudflare.

PS: Summary: If you use Cloudflare, you need only a certificate with your non-www domain name.


Thnx, it is working now.

closed #5

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