Certbot failed to authenticate some domains (authenticator: nginx)

I need to certificate my site with https by this How To Secure Nginx with Let's Encrypt on Ubuntu 20.04 | DigitalOcean step 4
Is it possible that connecting my domain to the server IP needs some time to connect it with DNS, that's why it gives an error about DNS?

My domain is:
matrix.level.family
I ran this command:
sudo certbot --nginx -d matrix.level.family -d www.matrix.level.family
It produced this output:
root@Boyle:“# sudo certbot --nginx -d matrix.level.family -d www.matrix. level.family
Saving debug log to /var/log/letsencrypt/letsencrypt. log
Requesting a certificate for matrix. level.family and www.matrix. level.family

Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:

Domain: www.matrix. level.family

Type: dns

Detail: DNS problem: NXDOMAIN looking up A for www.matrix.level.family - check that a DNS record exists for this domain; DNS p
roblem: NXDOMAIN looking up AAAA for www.matrix.level.family - check that a DNS record exists for this domain

Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed do
mains point to this nginx server and that it is accessible from the internet.

Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt. log
lor re-run Certbot with -v for more details.
My web server is (include version):
matrix.level.family
The operating system my web server runs on is (include version):
Ubuntu 22.04
My hosting provider, if applicable, is:
selectel.ru
I can login to a root shell on my machine (yes or no, or I don't know):
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):
yes

Hi @levelmilano, and welcome to the LE community forum :slight_smile:

"Base" domain resolves:

Name:    matrix.level.family
Address:  46.148.231.123

www does NOT resolve:

*** UnKnown can't find www.matrix.level.family: Non-existent domain

If you are going to serve content via both names, they both need to work.
http://www.your-domain currently fails.

3 Likes

how can i do it?

It happens in the DNS zone.
At the same place that you should have entered the IP for the matrix name.
majordomo.ru?

2 Likes

yep, so in the domain name I should type www.matrix.level.family?

It might be shorter:
www.matrix

The zone "level.family" is implied.

2 Likes

did it, now it should be connected but http://www.matrix.level.family/ still doesn't work

Ok, then you need to include that www name in your web server - in the same place as the matrix name.

3 Likes

Then you can get a cert that has both names on it :slight_smile:

3 Likes

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