Error certbot let's encrypt ngix ubuntu 16

Hi, after i have used certbot -a webroot -w webroot -d www.todoprogramasgratis.es -i apache certbot starts to make the certificate but i got this error:

The following errors were reported by the server:

Domain: www.todoprogramasgratis.es
Type: unauthorized
Detail: Invalid response from
http://www.todoprogramasgratis.es/.well-known/acme-challenge/Ii1vqoI6rasysK1VjD95KSwM-2qqZsZAcTMJm3_nAOA
[144.91.89.156]: "\n<html
xmlns=“http:”

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.

I also tried to do with my domain.es but got the same response.

IMPORTANT NOTES:

I think i have my DNS well, this problem can be due to .well-know. how can i know it?
i read a response post from @sahsanu explaining that

In that post sahsanu posted:

'Hi AngelicaGandica,

You have two problems here, the first one, as @schoen already said, you have no A record defined for domain dropbite.com but you have a second problem for www.dropbite.com , Let’s Encrypt can’t reach the challenge.

For the second problem, to be sure you are using the right Document Root for your domain and that the challenge file could be reached, create a test file and try to get it.

mkdir -p  /opt/mattermost/.well-known/acme-challenge/
echo -n "Testing acme-challenge" >  /opt/mattermost/.well-known/acme-challenge/test

Now use your browser to reach the test file http://www.dropbite.com/.well-known/acme-challenge/test

Or using command line:
curl -ikL http://www.dropbite.com/.well-known/acme-challenge/test

If you get the text “Testing acme-challenge” then it is ok, if you get another thing then… or the document root is not the right one or maybe your application Mattermost is doing something strange with these files.

If the problem is Mattermost application you could configure nginx to use a workaround but first, try the test.

Cheers,
sahsanu’

I also tried that and this is my error

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
    <title>404 &mdash; Not Found</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="description" content="Sorry, page not found"/>
    <style type="text/css">
        body {font-size:14px; color:#777777; font-family:arial; text-align:center;}
        h1 {font-size:180px; color:#99A7AF; margin: 70px 0 0 0;}
        h2 {color: #DE6C5D; font-family: arial; font-size: 20px; font-weight: bold; letter-spacing: -1px; margin: -3px 0 39px;}
        p {width:320px; text-align:center; margin-left:auto;margin-right:auto; margin-top: 30px }
        div {width:320px; text-align:center; margin-left:auto;margin-right:auto;}
        a:link {color: #34536A;}
        a:visited {color: #34536A;}
        a:active {color: #34536A;}
        a:hover {color: #34536A;}
    </style>
</head>

<body>
    <p><a href="http://todoprogramasgratis.es/">todoprogramasgratis.es</a></p>
    <h1>404</h1>
    <h2>Page Not Found</h2>
    <div>
        It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
        You can start again from the <a href="http://todoprogramasgratis.es/">home</a> or go back to <a href="javascript:%20history.go(-1)">previous page</a>.
    </div>
</body>
</html>

That’s give me a 404, and now im stocked, can you help me guys? Thank you.

You really need to answer there questions:

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. crt.sh | example.com), 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:

It produced this output:

My web server is (include version):

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

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

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

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