Is it possible to set the domain via regex or pattern

i have an app that i want to have a web interface at and an api at, since the domain is dynamic i thought i could configure that by using * and api.* as site domains respectively.

When using * works but api.* doesnt. Help would be appreciated.

Use of wildcards in hostnames are subject to RFC 6125 §6.4.3. Only left-side labels can have them. Issuance of wildcard TLS certificates follows this pattern, so Caddy conforms to that as well. You’ll probably have to elaborate. The “DNS-proper” way of doing what you want to do would be more like * instead of the other way around.


Thanks for the swift reply. i managed to get that working.

1 Like

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