Failed authorization - DNS problem: NXDOMAIN looking up TXT

My domain is:

I ran this command:
sudo certbot certonly --manual --manual-auth-hook /etc/letsencrypt/ --preferred-challenges dns --debug-challenges -d * -d

It produced this output:

Challenges loaded. Press continue to submit to CA. Pass "-v" for more info about

Press Enter to Continue
Cleaning up challenges
Failed authorization procedure. (dns-01): urn:ietf:params:acme:error:dns :: DNS problem: NXDOMAIN looking up TXT for - check that a DNS record exists for this domain, (dns-01): urn:ietf:params:acme:error:dns :: DNS problem: NXDOMAIN looking up TXT for - check that a DNS record exists for this domain


  • The following errors were reported by the server:

    Type: None
    Detail: DNS problem: NXDOMAIN looking up TXT for - check that a DNS record exists for
    this domain

My web server is (include version):

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

My hosting provider, if applicable, is:
google domains
I can login to a root shell on my machine (yes or no, or I don't know):
yes. I use a local VM to run above commangs and I am root user
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):
certbot 0.31.0

I did try to use lets encrypt an year ago, and I got help here . Issue was when creating custom record, automatically domain name gets suffixed . So I have to enter only _acme-challenge ( not
As i moved to a system that gave me certificate by default. I no longer used this feature.

I have a new machine and need to manage certificate myself.

I forgot all the key steps. I did remove custom record from domain, assuming that the command will create. SO now not sure of the type - TXT or CNAME

I do see this
Plugins selected: Authenticator manual, Installer None
Cert is due for renewal, auto-renewing...
Renewing an existing certificate
Performing the following challenges:
dns-01 challenge for
dns-01 challenge for

but I do not remember how txt file comes, where it will get created and next steps.

Please can you help with the steps.

certbot certificates gives INVALID expired

The first time you ran the script, it would have instructed you to set up a specific CNAME record for Somehow this is not there. Perhaps it was, but it's gone now.

I'm not familiar with the script myself, but looking at the code it seems to store some info in the file /etc/letsencrypt/acmedns.json (default location, unless you manually changed it). Perhaps you can find out there what the CNAME destination should be? Ah yes, it's stored in the variable "fulldomain". You should set up a CNAME resource record for with value you found in the fulldomain" variable from acmedns.json`.


Thank you @Osiris for your reply.

2 things - (1) certbot certificates gives INVALID expired certificate

(2) The json file is there (as you mentioned) , but I don't remember creating TXT record ?

The custom record in domain , has Data column value matching with fulldomain value of acmedns.json

Still the same error

Failed authorization procedure. (dns-01): urn:ietf:params:acme:error:dns :: DNS problem: NXDOMAIN looking up TXT for

1 Like

And it will stay expired, until Certbot is able to renew it, which currently fails.

For succesful use of the acme-dns principle, a CNAME should be made, not a TXT record. The acme-dns service takes care of the TXT record, the user of the CNAME record.

You should put the value of that fulldomain property as the valie of the CNAME record for Currently, there still is no such record.


Hi, I do see CNAME with acme-challenge in google domain

Can you show the screen you see this in?

Because I can't find a CNAME like that. You can check yourself with google dig tool or use unboundtest


I did delete on Aug 6th or 7th, but I created CNAME record ( as shown ) soon after I noticed TXT error from certbot command.

Note: I use custom name servers

Steps 3 in this article

Is the token value of username, password, fulldomain or subdomain of acmedns.json ?

I deleted record now. please can you tell how can I avoid renewal (auto detected) and start from scratch

I did follow the steps in a brand new Ubuntu VM

it said to create CNAME recors with displayed value, did that and continued to validate...again got the same problem

There is no such CNAME visible. Please make sure, after adding the CNAME, that it's actually there. You can use online dig tools such as @MikeMcQ already linked to above.

Also, in the screenshot you've shown above it clearly states:

Your domain isn't using these settings

Please make sure your DNS is working properly first. It also says in the tabs above:

Custom name servers (Active)

So it seems you're using custom name servers and not the proper one related to your DNS zone editor.


I did run
dig -t CNAME

I get some response, but cant validate because of my poor knowledge

Did you see the value? If not, then it wasn't correct.

Please also see the rest of my post about your DNS zone editor apparently not working properly.


Please try the command.

Custom name servers are ACtive - Yes. I tried to hook my domain to Google cloud DNS (and Compute engine behind that). and I have added the 4 entries as it asked (from NS type)

Now i want SSL certificate. Are these mutually exclusive?

There's no CNAME record.

So you have custom name servers active, but you're trying to add the CNAME record in the INACTIVE portion of your configuration panel? You surely must understand that's never going to work, right?

If you have custom name servers active, you must change the DNS zone in the zone editor of those custom name servers.


Sorry, can you please explain more on this point. How to do

I gave the reason why custom name servers are active (with screenshot of my google domain)
The screenshot is what I see in the name server tab

$ dig ns +short

Did you set googledomainsʼ NSes as “custom” name servers?


Which DNS servers?

Against which DNS server?


@nekit yes.

@rg305 Cloud DNS (google)

I dont know what you mean by which DNS server

I don't have experience with google hosting stuff, but it sounds like this setup confuses googleʼs servers. But itʼs weird that it works at all. Like the fact that it's even possible to query for A record(s) seems like a miracle.

Where would you go (which panel would you open) to change your A record for example. If you change it there, would the change actually apply?

1 Like