Syntax for DNS challenge for TXT not CNAME?

Does anyone know the syntax for certbot .40 that will do a DNS challenge using a txt record instead of a cname? Cname is giving me problems and it always worked with a txt record but I can't find my notes that had the syntax written down.

This is the command I'm running:

sudo certbot certonly --manual --manual-auth-hook /etc/letsencrypt/acme-dns-auth.py --preferred-challenges dns --debug-challenges -d *.your-domain -d your-domain

It asks for CNAME record to be made, not txt. I don't understand all these commands, I just copied this from somewhere like it's a run magazine in the 80s and you copy code to make a commodore 64 beep and boop but you have no idea how it worked, all you know is you copied what was in the magazine into the computer.

Is there a simple syntax for DNS challenge to do a TXT record instead of a CNAME? I don't care about having to manually go through the prompts, I just need something that works.

For that, just remove the --manual-auth-hook from your command so like this:

The auth hook is one way to automate the DNS challenge.

Are you sure you need a wildcard? Because otherwise the HTTP Challenge is often easier to setup. But, you cannot get a wildcard with the HTTP Challenge. A cert can have up to 100 names in it so if you just use a few names that don't change often you might consider this instead.

You do not give your domain name or DNS provider. But, I assume it is not available as a DNS plug-in for certbot. You could look at acme.sh (here) instead of certbot. It supports many more DNS plug-ins. If yours is supported that might be even easier.

3 Likes

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