# Wildcard certificate

**URL:** <https://community.letsencrypt.org/t/wildcard-certificate/94553>\
**Category:** Help\
**Created:** [May 27, 2019, 11:21am UTC](https://community.letsencrypt.org/t/wildcard-certificate/94553 "2019-05-27T11:21:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dooke](https://avatars.discourse-cdn.com/v4/letter/d/74df32/32.png) [@dooke](https://community.letsencrypt.org/u/dooke)\
**Post date:** [May 27, 2019, 11:21am UTC](https://community.letsencrypt.org/t/wildcard-certificate/94553/1 "2019-05-27T11:21:30Z")

</div>

Hello,

Thanks in advance for your help.

I tried to generate a wildcard certificate that works fine for simple subdomain.  
`$ sudo certbot certonly --server https://acme-v02.api.letsencrypt.org/directory --manual -d '*.domain.com'`

But my wish would be to have a certificate for a virtual subdomain like “virtual.\*.domain.com” because i use the macro module of apache.  
So i entered this command :  
`$ sudo certbot certonly --server https://acme-v02.api.letsencrypt.org/directory --manual -d 'virtual.*.doomain.com'`

I have no idea if this is a possible feature can’t find any documentations. My error message is :  
`Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator manual, Installer None Obtaining a new certificate An unexpected error occurred: The request message was malformed :: Error creating new order :: DNS name had a malformed wildcard label Please see the logfiles in /var/log/letsencrypt for more details.`

---

<div class="post-metadata">

**Author:** ![jmorahan](https://sea3.discourse-cdn.com/letsencrypt/user_avatar/community.letsencrypt.org/jmorahan/32/1873_2.png) [@jmorahan](https://community.letsencrypt.org/u/jmorahan)\
**Post date:** [May 27, 2019, 12:29pm UTC](https://community.letsencrypt.org/t/wildcard-certificate/94553/2 "2019-05-27T12:29:31Z")

</div>

> [@dooke](#):
>
> I have no idea if this is a possible feature

It is not. Unfortunately, only the leftmost label can be a wildcard. So you could have `*.virtual.example.com` but not `virtual.*.example.com`. This is a limitation of wildcard certificates in general, not specific to Let's Encrypt.

---

<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 26, 2019, 12:29pm UTC](https://community.letsencrypt.org/t/wildcard-certificate/94553/3 "2019-06-26T12:29:32Z")

</div>

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