# Automatic wildcard script

**URL:** <https://community.letsencrypt.org/t/automatic-wildcard-script/62716>\
**Category:** Client dev\
**Created:** [May 24, 2018, 11:42am UTC](https://community.letsencrypt.org/t/automatic-wildcard-script/62716 "2018-05-24T11:42:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![prig9951](https://avatars.discourse-cdn.com/v4/letter/p/4da419/32.png) [@prig9951](https://community.letsencrypt.org/u/prig9951)\
**Post date:** [May 24, 2018, 11:42am UTC](https://community.letsencrypt.org/t/automatic-wildcard-script/62716/1 "2018-05-24T11:42:44Z")

</div>

I run the following command to create one certificate for multiple domains and wildcard subdomains

sudo ~/certbot/letsencrypt-auto certonly --manual -d \*.example1.com -d [example1.com](http://example1.com) -d \*.example2.info -d example2.info -d [example3.com](http://example3.com) -d \*.example3.com --agree-tos --manual-public-ip-logging-ok --preferred-challenges dns-01 --server [https://acme-v02.api.letsencrypt.org/directory](https://acme-v02.api.letsencrypt.org/directory)

It works fine but I need to add DNS txt records manually.

Is there a command to have the DNS txt records add automatically. I assume there could be some hook to nsupdate.

---

<div class="post-metadata">

**Author:** ![stevenzhu](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/stevenzhu/32/18864_2.png) [@stevenzhu](https://community.letsencrypt.org/u/stevenzhu)\
**Post date:** [May 24, 2018, 12:05pm UTC](https://community.letsencrypt.org/t/automatic-wildcard-script/62716/2 "2018-05-24T12:05:51Z")

</div>

Hi,

It highly depend on your DNS provider… if you have API access for your DNS provider, you can try search if there is an existing API script. Else, you would want to find some other DNS provider with API access and cname \_acme-challenge.yourhost.tld to the DNS provider to automate the process.

Thank you

---

<div class="post-metadata">

**Author:** ![mnordhoff](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/mnordhoff/32/22583_2.png) [@mnordhoff](https://community.letsencrypt.org/u/mnordhoff)\
**Post date:** [May 24, 2018, 1:03pm UTC](https://community.letsencrypt.org/t/automatic-wildcard-script/62716/3 "2018-05-24T13:03:13Z")

</div>

> [@prig9951](#):
>
> I assume there could be some hook to nsupdate.

Certbot has a dynamic update plugin, but Certbot's DNS plugins aren't yet easy to install on all platforms. (In particular, certbot-auto doesn't install them.) What OS are you using?

[https://certbot-dns-rfc2136.readthedocs.io/en/latest/](https://certbot-dns-rfc2136.readthedocs.io/en/latest/)

---

<div class="post-metadata">

**Author:** ![Osiris](https://avatars.discourse-cdn.com/v4/letter/o/839c29/32.png) [@Osiris](https://community.letsencrypt.org/u/Osiris)\
**Post date:** [May 24, 2018, 1:53pm UTC](https://community.letsencrypt.org/t/automatic-wildcard-script/62716/4 "2018-05-24T13:53:40Z")

</div>

> [@prig9951](#):
>
> I assume there could be some hook to nsupdate.

Do you run `nsupdate` locally? If so, you might just script two hooks (adding and removal of the TXT RR) and use those scripts with `--manual-auth-hook` and `--manual-cleanup-hook`. See for more info: [User Guide — Certbot 2.7.0.dev0 documentation](https://certbot.eff.org/docs/using.html#pre-and-post-validation-hooks)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/letsencrypt/original/3X/c/a/ca6c06ea1ea201324bba7048c6841ce60236468d.png) [@system](https://community.letsencrypt.org/u/system)\
**Post date:** [June 23, 2018, 1:53pm UTC](https://community.letsencrypt.org/t/automatic-wildcard-script/62716/5 "2018-06-23T13:53:48Z")

</div>

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