-1

Certbot is a free and open-source utility mainly used for managing SSL/TLS certificates from the Let’s Encrypt certificate authority. When using Certbot to obtain a certificate through the DNS-01 challenge, Certbot will provide you with instructions to manually update a TXT record for the domain in order to proceed with the validation. The name of the TXT record is usually in the format “_acme-challenge.yourdomain.com”.

When I try to enter the name "_acme-challenge.yourdomain.com" for example, in the Google admin toolbox the TXT value does not show up, it says "Record not found". However when I remove the underscore from the name so it becomes "acme-challenge.yourdomain.com", the value of the TXT record that I entered in the dns config shows up. why?

  • 4
    @RomeoNinov totally permitted. It's valid symbol for DNS RR name. It is invalid for *hosnames*, which are reside in the DNS too, but if the DNS RR is not a hostname, it is pretty valid for its name to contain underscore or a slash. And **this record is not for a hostname**. It's a validation TXT record which doesn't specify host. Consider DKIM key, or SRV records, which contain underscores too. – Nikita Kipriyanov Jul 19 '23 at 17:58
  • You may have a look into [valid characters of a hostname](https://stackoverflow.com/a/3523068/6771046). Good point @NikitaKipriyanov. But that probably explain why it is not working since the value was maybe configured as hostname in the admin toolbox. – U880D Jul 19 '23 at 17:59

2 Answers2

3

This only could mean you didn't added the proper record _acme-challenge.example.com, but the wrong one without underscore. You have to add it properly.

Also, you aren't supposed to manipulate this record manually, whether it is a "Google admin toolbox" or whatever. "A" in ACME means "automatic", and Certbot has a whole lot of different plugins for popular APIs to automate this record manipulation. Which one to use depends on which API your DNS hoster supports.

Even if there was no plugin suitable for your case, you can create two custom scripts, of which one adds a record (with a proper name, with an underscore, of course), and the other one that removes it, and use them in validation hooks that Certbot provides: create with --manual-auth-hook and remove with --manual-cleanup-hook.

Nikita Kipriyanov
  • 10,947
  • 2
  • 24
  • 45
0

Thanks for the answer! It turned out, that the person responsible to registering the TXT record simply missed the "" in the beginning of it. So adding that "" fixed the whole issue!